#[non_exhaustive]pub enum NeoCalendarPeriodComponents {
Month,
YearMonth,
Year,
}
Expand description
A specification for a set of parts of a date. Only sets that yield “sensible” dates are allowed: this type cannot describe a date such as “August, Anno Domini”.
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.
Month
A standalone month, as in “January”.
YearMonth
A month and year, as in “January 2000”.
Year
A year, as in “2000”.
Implementations§
source§impl NeoCalendarPeriodComponents
impl NeoCalendarPeriodComponents
sourcepub const fn id_str(self) -> &'static DataMarkerAttributes
pub const fn id_str(self) -> &'static DataMarkerAttributes
Returns a stable string identifying this set of components.
For details, see NeoDateComponents::id_str()
.
sourcepub fn from_id_str(id_str: &DataMarkerAttributes) -> Option<Self>
pub fn from_id_str(id_str: &DataMarkerAttributes) -> Option<Self>
Returns the set of components for the given stable string.
For details, see NeoDateComponents::from_id_str()
.
sourcepub fn long(self) -> NeoCalendarPeriodSkeleton
pub fn long(self) -> NeoCalendarPeriodSkeleton
Creates a skeleton for this field set with a long length.
sourcepub fn medium(self) -> NeoCalendarPeriodSkeleton
pub fn medium(self) -> NeoCalendarPeriodSkeleton
Creates a skeleton for this field set with a medium length.
sourcepub fn short(self) -> NeoCalendarPeriodSkeleton
pub fn short(self) -> NeoCalendarPeriodSkeleton
Creates a skeleton for this field set with a short length.
Trait Implementations§
source§impl Clone for NeoCalendarPeriodComponents
impl Clone for NeoCalendarPeriodComponents
source§fn clone(&self) -> NeoCalendarPeriodComponents
fn clone(&self) -> NeoCalendarPeriodComponents
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 NeoCalendarPeriodComponents
impl Debug for NeoCalendarPeriodComponents
source§impl From<NeoCalendarPeriodComponents> for NeoComponents
impl From<NeoCalendarPeriodComponents> for NeoComponents
source§fn from(value: NeoCalendarPeriodComponents) -> Self
fn from(value: NeoCalendarPeriodComponents) -> Self
Converts to this type from the input type.
source§impl From<NeoCalendarPeriodComponents> for NeoDateTimeComponents
impl From<NeoCalendarPeriodComponents> for NeoDateTimeComponents
source§fn from(value: NeoCalendarPeriodComponents) -> Self
fn from(value: NeoCalendarPeriodComponents) -> Self
Converts to this type from the input type.
source§impl Hash for NeoCalendarPeriodComponents
impl Hash for NeoCalendarPeriodComponents
impl Copy for NeoCalendarPeriodComponents
impl Eq for NeoCalendarPeriodComponents
impl StructuralPartialEq for NeoCalendarPeriodComponents
Auto Trait Implementations§
impl Freeze for NeoCalendarPeriodComponents
impl RefUnwindSafe for NeoCalendarPeriodComponents
impl Send for NeoCalendarPeriodComponents
impl Sync for NeoCalendarPeriodComponents
impl Unpin for NeoCalendarPeriodComponents
impl UnwindSafe for NeoCalendarPeriodComponents
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