Enum icu_capi::calendar::ffi::AnyCalendarKind

source ·
#[repr(C)]
pub enum AnyCalendarKind {
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 Calendar

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 AnyCalendarKind

source

pub fn get_for_locale(locale: &Locale) -> Option<AnyCalendarKind>

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<AnyCalendarKind>

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 DiplomatWrite)

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

Trait Implementations§

source§

impl Clone for AnyCalendarKind

source§

fn clone(&self) -> AnyCalendarKind

Returns a copy 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 AnyCalendarKind

source§

fn from(other: AnyCalendarKind) -> Self

Converts to this type from the input type.
source§

impl From<AnyCalendarKind> for AnyCalendarKind

source§

fn from(this: AnyCalendarKind) -> Self

Converts to this type from the input type.
source§

impl Copy for AnyCalendarKind

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, dst: *mut T)

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> GetField<T> for T
where T: Copy,

source§

fn get_field(&self) -> T

Returns the value of this trait’s field T.
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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
where T: Send + Sync,