Enum icu_calendar::types::YearAmbiguity
source · pub enum YearAmbiguity {
Unambiguous,
CenturyRequired,
EraRequired,
EraAndCenturyRequired,
}
Expand description
Defines whether the era or century is required to interpret the year.
For example 2024 AD can be formatted as 2024
, or even 24
, but 1931 AD
should not be formatted as 31
, and 2024 BC should not be formatted as 2024
.
Variants§
Unambiguous
The year is unambiguous without a century or era.
CenturyRequired
The century is required, the era may be included.
EraRequired
The era is required, the century may be included.
EraAndCenturyRequired
The century and era are required.
Trait Implementations§
source§impl Clone for YearAmbiguity
impl Clone for YearAmbiguity
source§fn clone(&self) -> YearAmbiguity
fn clone(&self) -> YearAmbiguity
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 YearAmbiguity
impl Debug for YearAmbiguity
source§impl PartialEq for YearAmbiguity
impl PartialEq for YearAmbiguity
impl Copy for YearAmbiguity
impl StructuralPartialEq for YearAmbiguity
Auto Trait Implementations§
impl Freeze for YearAmbiguity
impl RefUnwindSafe for YearAmbiguity
impl Send for YearAmbiguity
impl Sync for YearAmbiguity
impl Unpin for YearAmbiguity
impl UnwindSafe for YearAmbiguity
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> 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)
🔬This is a nightly-only experimental API. (
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>
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