#[non_exhaustive]pub enum AnyCalendarKind {
Show 18 variants
Buddhist,
Chinese,
Coptic,
Dangi,
Ethiopian,
EthiopianAmeteAlem,
Gregorian,
Hebrew,
Indian,
IslamicCivil,
IslamicObservational,
IslamicTabular,
IslamicUmmAlQura,
Iso,
Japanese,
JapaneseExtended,
Persian,
Roc,
}Expand description
Convenient type for selecting the kind of AnyCalendar to construct
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Buddhist
The kind of a Buddhist calendar
Chinese
The kind of a Chinese calendar
Coptic
The kind of a Coptic calendar
Dangi
The kind of a Dangi calendar
Ethiopian
The kind of an Ethiopian calendar, with Amete Mihret era
EthiopianAmeteAlem
The kind of an Ethiopian calendar, with Amete Alem era
Gregorian
The kind of a Gregorian calendar
Hebrew
The kind of a Hebrew calendar
Indian
The kind of a Indian calendar
IslamicCivil
The kind of an IslamicCivil calendar
IslamicObservational
The kind of an IslamicObservational calendar
IslamicTabular
The kind of an IslamicTabular calendar
IslamicUmmAlQura
The kind of an IslamicUmmAlQura calendar
Iso
The kind of an Iso calendar
Japanese
The kind of a Japanese calendar
JapaneseExtended
The kind of a JapaneseExtended calendar
Persian
The kind of a Persian calendar
Roc
The kind of a Roc calendar
Implementations§
Source§impl AnyCalendarKind
impl AnyCalendarKind
Sourcepub fn get_for_bcp47_string(x: &str) -> Option<Self>
pub fn get_for_bcp47_string(x: &str) -> Option<Self>
Construct from a BCP-47 string
Returns None if the calendar is unknown. If you prefer an error, use
CalendarError::unknown_any_calendar_kind.
Sourcepub fn get_for_bcp47_bytes(x: &[u8]) -> Option<Self>
pub fn get_for_bcp47_bytes(x: &[u8]) -> Option<Self>
Construct from a BCP-47 byte string
Returns None if the calendar is unknown. If you prefer an error, use
CalendarError::unknown_any_calendar_kind.
Sourcepub fn get_for_bcp47_value(x: &Value) -> Option<Self>
pub fn get_for_bcp47_value(x: &Value) -> Option<Self>
Construct from a BCP-47 Value
Returns None if the calendar is unknown. If you prefer an error, use
CalendarError::unknown_any_calendar_kind.
Sourcepub fn as_bcp47_string(self) -> &'static str
pub fn as_bcp47_string(self) -> &'static str
Convert to a BCP-47 string
Sourcepub fn as_bcp47_value(self) -> Value
pub fn as_bcp47_value(self) -> Value
Convert to a BCP-47 Value
Sourcepub fn get_for_locale(l: &Locale) -> Option<Self>
pub fn get_for_locale(l: &Locale) -> Option<Self>
Extract the calendar component from a Locale
Returns None if the calendar is not specified or unknown. If you prefer an error, use
CalendarError::unknown_any_calendar_kind.
Trait Implementations§
Source§impl Clone for AnyCalendarKind
impl Clone for AnyCalendarKind
Source§fn clone(&self) -> AnyCalendarKind
fn clone(&self) -> AnyCalendarKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnyCalendarKind
impl Debug for AnyCalendarKind
Source§impl Display for AnyCalendarKind
impl Display for AnyCalendarKind
Source§impl Hash for AnyCalendarKind
impl Hash for AnyCalendarKind
Source§impl Ord for AnyCalendarKind
impl Ord for AnyCalendarKind
Source§fn cmp(&self, other: &AnyCalendarKind) -> Ordering
fn cmp(&self, other: &AnyCalendarKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AnyCalendarKind
impl PartialEq for AnyCalendarKind
Source§impl PartialOrd for AnyCalendarKind
impl PartialOrd for AnyCalendarKind
impl Copy for AnyCalendarKind
impl Eq for AnyCalendarKind
impl StructuralPartialEq for AnyCalendarKind
Auto Trait Implementations§
impl Freeze for AnyCalendarKind
impl RefUnwindSafe for AnyCalendarKind
impl Send for AnyCalendarKind
impl Sync for AnyCalendarKind
impl Unpin for AnyCalendarKind
impl UnwindSafe for AnyCalendarKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 1 byte
Size for each variant:
Buddhist: 0 bytesChinese: 0 bytesCoptic: 0 bytesDangi: 0 bytesEthiopian: 0 bytesEthiopianAmeteAlem: 0 bytesGregorian: 0 bytesHebrew: 0 bytesIndian: 0 bytesIslamicCivil: 0 bytesIslamicObservational: 0 bytesIslamicTabular: 0 bytesIslamicUmmAlQura: 0 bytesIso: 0 bytesJapanese: 0 bytesJapaneseExtended: 0 bytesPersian: 0 bytesRoc: 0 bytes