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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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
Source§fn eq(&self, other: &YearAmbiguity) -> bool
fn eq(&self, other: &YearAmbiguity) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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