ICU4XAnyCalendarKind

Enum ICU4XAnyCalendarKind 

Source
#[repr(C)]
pub enum ICU4XAnyCalendarKind {
Show 18 variants Iso = 0, Gregorian = 1, Buddhist = 2, Japanese = 3, JapaneseExtended = 4, Ethiopian = 5, EthiopianAmeteAlem = 6, Indian = 7, Coptic = 8, Dangi = 9, Chinese = 10, Hebrew = 11, IslamicCivil = 12, IslamicObservational = 13, IslamicTabular = 14, IslamicUmmAlQura = 15, Persian = 16, Roc = 17,
}
Expand description

The various calendar types currently supported by ICU4XCalendar

Variants§

§

Iso = 0

The kind of an Iso calendar

§

Gregorian = 1

The kind of a Gregorian calendar

§

Buddhist = 2

The kind of a Buddhist calendar

§

Japanese = 3

The kind of a Japanese calendar with modern eras

§

JapaneseExtended = 4

The kind of a Japanese calendar with modern and historic eras

§

Ethiopian = 5

The kind of an Ethiopian calendar, with Amete Mihret era

§

EthiopianAmeteAlem = 6

The kind of an Ethiopian calendar, with Amete Alem era

§

Indian = 7

The kind of a Indian calendar

§

Coptic = 8

The kind of a Coptic calendar

§

Dangi = 9

The kind of a Dangi calendar

§

Chinese = 10

The kind of a Chinese calendar

§

Hebrew = 11

The kind of a Hebrew calendar

§

IslamicCivil = 12

The kind of a Islamic civil calendar

§

IslamicObservational = 13

The kind of a Islamic observational calendar

§

IslamicTabular = 14

The kind of a Islamic tabular calendar

§

IslamicUmmAlQura = 15

The kind of a Islamic Umm al-Qura calendar

§

Persian = 16

The kind of a Persian calendar

§

Roc = 17

The kind of a Roc calendar

Implementations§

Source§

impl ICU4XAnyCalendarKind

Source

pub fn get_for_locale(locale: &ICU4XLocale) -> Option<ICU4XAnyCalendarKind>

Read the calendar type off of the -u-ca- extension on a locale.

Returns nothing if there is no calendar on the locale or if the locale’s calendar is not known or supported.

Source

pub fn get_for_bcp47(s: &DiplomatStr) -> Option<ICU4XAnyCalendarKind>

Obtain the calendar type given a BCP-47 -u-ca- extension string.

Returns nothing if the calendar is not known or supported.

Source

pub fn bcp47(self, write: &mut DiplomatWriteable) -> Result<(), ICU4XError>

Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.

Trait Implementations§

Source§

impl Clone for ICU4XAnyCalendarKind

Source§

fn clone(&self) -> ICU4XAnyCalendarKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl From<AnyCalendarKind> for ICU4XAnyCalendarKind

Source§

fn from(other: AnyCalendarKind) -> Self

Converts to this type from the input type.
Source§

impl From<ICU4XAnyCalendarKind> for AnyCalendarKind

Source§

fn from(this: ICU4XAnyCalendarKind) -> Self

Converts to this type from the input type.
Source§

impl Copy for ICU4XAnyCalendarKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 4 bytes

Size for each variant:

  • Iso: 0 bytes
  • Gregorian: 0 bytes
  • Buddhist: 0 bytes
  • Japanese: 0 bytes
  • JapaneseExtended: 0 bytes
  • Ethiopian: 0 bytes
  • EthiopianAmeteAlem: 0 bytes
  • Indian: 0 bytes
  • Coptic: 0 bytes
  • Dangi: 0 bytes
  • Chinese: 0 bytes
  • Hebrew: 0 bytes
  • IslamicCivil: 0 bytes
  • IslamicObservational: 0 bytes
  • IslamicTabular: 0 bytes
  • IslamicUmmAlQura: 0 bytes
  • Persian: 0 bytes
  • Roc: 0 bytes