Enum icu_datetime::neo_skeleton::EraDisplay
source · #[non_exhaustive]pub enum EraDisplay {
Auto,
Always,
}
Expand description
A specification for when to display the era when formatting a year.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Display the era when needed to disambiguate the year.
This is the default option.
Examples:
1000 BC
77 AD
2024
Always
Always display the era.
Examples:
1000 BC
77 AD
2024 AD
Trait Implementations§
source§impl Clone for EraDisplay
impl Clone for EraDisplay
source§fn clone(&self) -> EraDisplay
fn clone(&self) -> EraDisplay
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EraDisplay
impl Debug for EraDisplay
source§impl<'de> Deserialize<'de> for EraDisplay
impl<'de> Deserialize<'de> for EraDisplay
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for EraDisplay
impl Hash for EraDisplay
source§impl PartialEq for EraDisplay
impl PartialEq for EraDisplay
source§fn eq(&self, other: &EraDisplay) -> bool
fn eq(&self, other: &EraDisplay) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EraDisplay
impl Serialize for EraDisplay
impl Copy for EraDisplay
impl Eq for EraDisplay
impl StructuralPartialEq for EraDisplay
Auto Trait Implementations§
impl Freeze for EraDisplay
impl RefUnwindSafe for EraDisplay
impl Send for EraDisplay
impl Sync for EraDisplay
impl Unpin for EraDisplay
impl UnwindSafe for EraDisplay
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
Mutably borrows from an owned value. Read more
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>
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 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>
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