#[non_exhaustive]pub enum CompositeDateTimeFieldSet {
Date(DateFieldSet),
CalendarPeriod(CalendarPeriodFieldSet),
Time(TimeFieldSet),
DateTime(DateAndTimeFieldSet),
}
Expand description
An enum supporting date, calendar period, time, and date+time field sets and options.
Time zones are not supported with this enum.
This enum is useful when formatting a type that does not contain a time zone or to avoid storing time zone data.
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.
Date(DateFieldSet)
Field set for a date.
CalendarPeriod(CalendarPeriodFieldSet)
Field set for a calendar period.
Time(TimeFieldSet)
Field set for a time.
DateTime(DateAndTimeFieldSet)
Field set for a date and a time together.
Implementations§
source§impl CompositeDateTimeFieldSet
impl CompositeDateTimeFieldSet
sourcepub fn try_from_composite_field_set(
field_set: CompositeFieldSet,
) -> Option<Self>
pub fn try_from_composite_field_set( field_set: CompositeFieldSet, ) -> Option<Self>
If the CompositeFieldSet
does not contain a time zone,
returns the corresponding CompositeDateTimeFieldSet
.
sourcepub fn to_composite_field_set(self) -> CompositeFieldSet
pub fn to_composite_field_set(self) -> CompositeFieldSet
Returns the CompositeFieldSet
corresponding to this
CompositeDateTimeFieldSet
.
Trait Implementations§
source§impl Clone for CompositeDateTimeFieldSet
impl Clone for CompositeDateTimeFieldSet
source§fn clone(&self) -> CompositeDateTimeFieldSet
fn clone(&self) -> CompositeDateTimeFieldSet
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 DateTimeMarkers for CompositeDateTimeFieldSet
impl DateTimeMarkers for CompositeDateTimeFieldSet
source§type D = DateFieldSet
type D = DateFieldSet
Associated types for date formatting. Read more
source§type T = TimeFieldSet
type T = TimeFieldSet
Associated types for time formatting. Read more
source§type GluePatternV1Marker = GluePatternV1Marker
type GluePatternV1Marker = GluePatternV1Marker
Marker for loading the date/time glue pattern.
source§impl DateTimeNamesMarker for CompositeDateTimeFieldSet
impl DateTimeNamesMarker for CompositeDateTimeFieldSet
type YearNames = YearNamesV1Marker
type MonthNames = MonthNamesV1Marker
type WeekdayNames = WeekdayNamesV1Marker
type DayPeriodNames = DayPeriodNamesV1Marker
type ZoneEssentials = ()
type ZoneLocations = ()
type ZoneGenericLong = ()
type ZoneGenericShort = ()
type ZoneSpecificLong = ()
type ZoneSpecificShort = ()
type MetazoneLookup = ()
source§impl Debug for CompositeDateTimeFieldSet
impl Debug for CompositeDateTimeFieldSet
source§impl GetField<CompositeFieldSet> for CompositeDateTimeFieldSet
impl GetField<CompositeFieldSet> for CompositeDateTimeFieldSet
source§fn get_field(&self) -> CompositeFieldSet
fn get_field(&self) -> CompositeFieldSet
Returns the value of this trait’s field
T
.impl Copy for CompositeDateTimeFieldSet
impl Eq for CompositeDateTimeFieldSet
impl StructuralPartialEq for CompositeDateTimeFieldSet
impl UnstableSealed for CompositeDateTimeFieldSet
Auto Trait Implementations§
impl Freeze for CompositeDateTimeFieldSet
impl RefUnwindSafe for CompositeDateTimeFieldSet
impl Send for CompositeDateTimeFieldSet
impl Sync for CompositeDateTimeFieldSet
impl Unpin for CompositeDateTimeFieldSet
impl UnwindSafe for CompositeDateTimeFieldSet
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