Enum icu_capi::calendar::ffi::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
impl ICU4XAnyCalendarKind
sourcepub fn get_for_locale(locale: &ICU4XLocale) -> Option<ICU4XAnyCalendarKind>
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.
sourcepub fn get_for_bcp47(s: &DiplomatStr) -> Option<ICU4XAnyCalendarKind>
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.
sourcepub fn bcp47(self, write: &mut DiplomatWriteable) -> Result<(), ICU4XError>
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
impl Clone for ICU4XAnyCalendarKind
source§fn clone(&self) -> ICU4XAnyCalendarKind
fn clone(&self) -> ICU4XAnyCalendarKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl From<AnyCalendarKind> for ICU4XAnyCalendarKind
impl From<AnyCalendarKind> for ICU4XAnyCalendarKind
source§fn from(other: AnyCalendarKind) -> Self
fn from(other: AnyCalendarKind) -> Self
source§impl From<ICU4XAnyCalendarKind> for AnyCalendarKind
impl From<ICU4XAnyCalendarKind> for AnyCalendarKind
source§fn from(this: ICU4XAnyCalendarKind) -> Self
fn from(this: ICU4XAnyCalendarKind) -> Self
impl Copy for ICU4XAnyCalendarKind
Auto Trait Implementations§
impl Freeze for ICU4XAnyCalendarKind
impl RefUnwindSafe for ICU4XAnyCalendarKind
impl Send for ICU4XAnyCalendarKind
impl Sync for ICU4XAnyCalendarKind
impl Unpin for ICU4XAnyCalendarKind
impl UnwindSafe for ICU4XAnyCalendarKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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