Enum icu::locale::preferences::extensions::unicode::keywords::CalendarAlgorithm
source · #[non_exhaustive]pub enum CalendarAlgorithm {
Show 14 variants
Buddhist,
Chinese,
Coptic,
Dangi,
Ethioaa,
Ethiopic,
Gregory,
Hebrew,
Indian,
Islamic(Option<IslamicCalendarAlgorithm>),
Iso8601,
Japanese,
Persian,
Roc,
}
Expand description
A Unicode Calendar Identifier defines a type of calendar.
This selects calendar-specific data within a locale used for formatting and parsing, such as date/time symbols and patterns; it also selects supplemental calendarData used for calendrical calculations. The value can affect the computation of the first day of the week.
The valid values are listed in LDML.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Buddhist
Thai Buddhist calendar (same as Gregorian except for the year)
Chinese
Traditional Chinese calendar
Coptic
Coptic calendar
Dangi
Traditional Korean calendar
Ethioaa
Ethiopic calendar, Amete Alem (epoch approx. 5493 B.C.E)
Ethiopic
Ethiopic calendar, Amete Mihret (epoch approx, 8 C.E.)
Gregory
Gregorian calendar
Hebrew
Traditional Hebrew calendar
Indian
Indian calendar
Islamic(Option<IslamicCalendarAlgorithm>)
Islamic calendar
Iso8601
ISO calendar (Gregorian calendar using the ISO 8601 calendar week rules)
Japanese
Japanese Imperial calendar
Persian
Persian calendar
Roc
Republic of China calendar
Implementations§
Trait Implementations§
source§impl Clone for CalendarAlgorithm
impl Clone for CalendarAlgorithm
source§fn clone(&self) -> CalendarAlgorithm
fn clone(&self) -> CalendarAlgorithm
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CalendarAlgorithm
impl Debug for CalendarAlgorithm
source§impl From<CalendarAlgorithm> for Value
impl From<CalendarAlgorithm> for Value
source§fn from(input: CalendarAlgorithm) -> Value
fn from(input: CalendarAlgorithm) -> Value
source§impl Hash for CalendarAlgorithm
impl Hash for CalendarAlgorithm
source§impl PartialEq for CalendarAlgorithm
impl PartialEq for CalendarAlgorithm
source§impl PreferenceKey for CalendarAlgorithm
impl PreferenceKey for CalendarAlgorithm
source§fn unicode_extension_key() -> Option<Key>
fn unicode_extension_key() -> Option<Key>
source§fn try_from_key_value(
key: &Key,
value: &Value,
) -> Result<Option<CalendarAlgorithm>, PreferencesParseError>
fn try_from_key_value( key: &Key, value: &Value, ) -> Result<Option<CalendarAlgorithm>, PreferencesParseError>
source§fn unicode_extension_value(&self) -> Option<Value>
fn unicode_extension_value(&self) -> Option<Value>
source§impl TryFrom<&Value> for CalendarAlgorithm
impl TryFrom<&Value> for CalendarAlgorithm
source§type Error = PreferencesParseError
type Error = PreferencesParseError
source§fn try_from(
s: &Value,
) -> Result<CalendarAlgorithm, <CalendarAlgorithm as TryFrom<&Value>>::Error>
fn try_from( s: &Value, ) -> Result<CalendarAlgorithm, <CalendarAlgorithm as TryFrom<&Value>>::Error>
impl Copy for CalendarAlgorithm
impl Eq for CalendarAlgorithm
impl StructuralPartialEq for CalendarAlgorithm
Auto Trait Implementations§
impl Freeze for CalendarAlgorithm
impl RefUnwindSafe for CalendarAlgorithm
impl Send for CalendarAlgorithm
impl Sync for CalendarAlgorithm
impl Unpin for CalendarAlgorithm
impl UnwindSafe for CalendarAlgorithm
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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