#[non_exhaustive]pub enum NeoDateComponents {
Day(NeoDayComponents),
Month,
YearMonth,
EraYearMonth,
Year,
EraYear,
YearWeek,
}
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
Day(NeoDayComponents)
A date that specifies a single day. See NeoDayComponents
.
Month
A standalone month, as in “January”.
YearMonth
A month and year, as in “January 2000”.
EraYearMonth
A month, year, and era, as in “January 2000 A.D”.
Year
A year, as in “2000”.
EraYear
A year with era, as in “2000 A.D.”.
YearWeek
The year and week of the year, as in “52nd week of 1999”.
Implementations§
source§impl NeoDateComponents
impl NeoDateComponents
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 NeoDayComponents::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 NeoDayComponents::from_id_str()
.
sourcepub fn has_full_year(self) -> bool
pub fn has_full_year(self) -> bool
Whether this field set contains the full year / eras.
sourcepub fn has_weekday(self) -> bool
pub fn has_weekday(self) -> bool
Whether this field set contains the weekday.
Trait Implementations§
source§impl Clone for NeoDateComponents
impl Clone for NeoDateComponents
source§fn clone(&self) -> NeoDateComponents
fn clone(&self) -> NeoDateComponents
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl DateDataMarkers for NeoDateComponents
impl DateDataMarkers for NeoDateComponents
§type Skel = FullDataCalMarkers
type Skel = FullDataCalMarkers
§type Year = FullDataCalMarkers
type Year = FullDataCalMarkers
§type Month = FullDataCalMarkers
type Month = FullDataCalMarkers
§type WeekdayNamesV1Marker = WeekdayNamesV1Marker
type WeekdayNamesV1Marker = WeekdayNamesV1Marker
source§impl DateInputMarkers for NeoDateComponents
impl DateInputMarkers for NeoDateComponents
§type MonthInput = MonthInfo
type MonthInput = MonthInfo
§type DayOfMonthInput = DayOfMonth
type DayOfMonthInput = DayOfMonth
§type DayOfWeekInput = IsoWeekday
type DayOfWeekInput = IsoWeekday
§type DayOfYearInput = DayOfYearInfo
type DayOfYearInput = DayOfYearInfo
§type AnyCalendarKindInput = AnyCalendarKind
type AnyCalendarKindInput = AnyCalendarKind
source§impl DateTimeMarkers for NeoDateComponents
impl DateTimeMarkers for NeoDateComponents
§type D = NeoDateComponents
type D = NeoDateComponents
§type T = NeoNeverMarker
type T = NeoNeverMarker
§type Z = NeoNeverMarker
type Z = NeoNeverMarker
§type LengthOption = NeoSkeletonLength
type LengthOption = NeoSkeletonLength
§type AlignmentOption = Option<Alignment>
type AlignmentOption = Option<Alignment>
§type EraDisplayOption = Option<EraDisplay>
type EraDisplayOption = Option<EraDisplay>
§type FractionalSecondDigitsOption = NeverField
type FractionalSecondDigitsOption = NeverField
§type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
type GluePatternV1Marker = NeverMarker<GluePatternV1<'static>>
source§impl Debug for NeoDateComponents
impl Debug for NeoDateComponents
source§impl From<NeoDateComponents> for NeoComponents
impl From<NeoDateComponents> for NeoComponents
source§fn from(value: NeoDateComponents) -> Self
fn from(value: NeoDateComponents) -> Self
source§impl From<NeoDateComponents> for NeoDateTimeComponents
impl From<NeoDateComponents> for NeoDateTimeComponents
source§fn from(value: NeoDateComponents) -> Self
fn from(value: NeoDateComponents) -> Self
source§impl Hash for NeoDateComponents
impl Hash for NeoDateComponents
source§impl PartialEq for NeoDateComponents
impl PartialEq for NeoDateComponents
source§fn eq(&self, other: &NeoDateComponents) -> bool
fn eq(&self, other: &NeoDateComponents) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<C: CldrCalendar> TypedDateDataMarkers<C> for NeoDateComponents
impl<C: CldrCalendar> TypedDateDataMarkers<C> for NeoDateComponents
§type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
type DateSkeletonPatternsV1Marker = <C as CldrCalendar>::SkeletaV1Marker
§type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
type YearNamesV1Marker = <C as CldrCalendar>::YearNamesV1Marker
§type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
type MonthNamesV1Marker = <C as CldrCalendar>::MonthNamesV1Marker
§type WeekdayNamesV1Marker = WeekdayNamesV1Marker
type WeekdayNamesV1Marker = WeekdayNamesV1Marker
impl Copy for NeoDateComponents
impl Eq for NeoDateComponents
impl IsRuntimeComponents for NeoDateComponents
impl StructuralPartialEq for NeoDateComponents
Auto Trait Implementations§
impl Freeze for NeoDateComponents
impl RefUnwindSafe for NeoDateComponents
impl Send for NeoDateComponents
impl Sync for NeoDateComponents
impl Unpin for NeoDateComponents
impl UnwindSafe for NeoDateComponents
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> 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