Enum icu::datetime::neo_skeleton::NeoComponents
source · #[non_exhaustive]pub enum NeoComponents {
Date(NeoDateComponents),
CalendarPeriod(NeoCalendarPeriodComponents),
Time(NeoTimeComponents),
Zone(NeoTimeZoneStyle),
DateTime(NeoDateComponents, NeoTimeComponents),
DateZone(NeoDateComponents, NeoTimeZoneStyle),
TimeZone(NeoTimeComponents, NeoTimeZoneStyle),
DateTimeZone(NeoDateComponents, NeoTimeComponents, NeoTimeZoneStyle),
}
Expand description
A specification of components for parts of a datetime and/or time zone.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Date(NeoDateComponents)
Components for a date.
CalendarPeriod(NeoCalendarPeriodComponents)
Components for a calendar period.
Time(NeoTimeComponents)
Components for a time.
Zone(NeoTimeZoneStyle)
Components for a time zone.
DateTime(NeoDateComponents, NeoTimeComponents)
Components for a date and a time together.
DateZone(NeoDateComponents, NeoTimeZoneStyle)
Components for a date and a time zone together.
TimeZone(NeoTimeComponents, NeoTimeZoneStyle)
Components for a time and a time zone together.
DateTimeZone(NeoDateComponents, NeoTimeComponents, NeoTimeZoneStyle)
Components for a date, a time, and a time zone together.
Implementations§
source§impl NeoComponents
impl NeoComponents
sourcepub const fn id_str(self) -> Option<&'static DataMarkerAttributes>
pub const fn id_str(self) -> Option<&'static DataMarkerAttributes>
Returns a stable string identifying this field set, but only if this set has its own pattern override.
For details, see NeoDateComponents::id_str()
.
sourcepub fn from_id_str(id_str: &DataMarkerAttributes) -> Option<NeoComponents>
pub fn from_id_str(id_str: &DataMarkerAttributes) -> Option<NeoComponents>
Returns the field set for the given stable string, but only if this set has its own pattern override.
For details, see NeoDateComponents::from_id_str()
.
sourcepub fn has_weekday(self) -> bool
pub fn has_weekday(self) -> bool
Whether this field set contains the weekday.
sourcepub fn long(self) -> NeoSkeleton
pub fn long(self) -> NeoSkeleton
Creates a skeleton for this field set with a long length.
sourcepub fn medium(self) -> NeoSkeleton
pub fn medium(self) -> NeoSkeleton
Creates a skeleton for this field set with a medium length.
sourcepub fn short(self) -> NeoSkeleton
pub fn short(self) -> NeoSkeleton
Creates a skeleton for this field set with a short length.
Trait Implementations§
source§impl Clone for NeoComponents
impl Clone for NeoComponents
source§fn clone(&self) -> NeoComponents
fn clone(&self) -> NeoComponents
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NeoComponents
impl Debug for NeoComponents
source§impl From<NeoCalendarPeriodComponents> for NeoComponents
impl From<NeoCalendarPeriodComponents> for NeoComponents
source§fn from(value: NeoCalendarPeriodComponents) -> NeoComponents
fn from(value: NeoCalendarPeriodComponents) -> NeoComponents
source§impl From<NeoDateComponents> for NeoComponents
impl From<NeoDateComponents> for NeoComponents
source§fn from(value: NeoDateComponents) -> NeoComponents
fn from(value: NeoDateComponents) -> NeoComponents
source§impl From<NeoDateTimeComponents> for NeoComponents
impl From<NeoDateTimeComponents> for NeoComponents
source§fn from(value: NeoDateTimeComponents) -> NeoComponents
fn from(value: NeoDateTimeComponents) -> NeoComponents
source§impl From<NeoTimeComponents> for NeoComponents
impl From<NeoTimeComponents> for NeoComponents
source§fn from(value: NeoTimeComponents) -> NeoComponents
fn from(value: NeoTimeComponents) -> NeoComponents
source§impl From<NeoTimeZoneStyle> for NeoComponents
impl From<NeoTimeZoneStyle> for NeoComponents
source§fn from(value: NeoTimeZoneStyle) -> NeoComponents
fn from(value: NeoTimeZoneStyle) -> NeoComponents
source§impl GetField<NeoComponents> for NeoCalendarPeriodSkeleton
impl GetField<NeoComponents> for NeoCalendarPeriodSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl GetField<NeoComponents> for NeoDateSkeleton
impl GetField<NeoComponents> for NeoDateSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl GetField<NeoComponents> for NeoDateTimeSkeleton
impl GetField<NeoComponents> for NeoDateTimeSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl GetField<NeoComponents> for NeoSkeleton
impl GetField<NeoComponents> for NeoSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl GetField<NeoComponents> for NeoTimeSkeleton
impl GetField<NeoComponents> for NeoTimeSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl GetField<NeoComponents> for NeoTimeZoneSkeleton
impl GetField<NeoComponents> for NeoTimeZoneSkeleton
source§fn get_field(&self) -> NeoComponents
fn get_field(&self) -> NeoComponents
T
.source§impl Hash for NeoComponents
impl Hash for NeoComponents
source§impl PartialEq for NeoComponents
impl PartialEq for NeoComponents
impl Copy for NeoComponents
impl Eq for NeoComponents
impl StructuralPartialEq for NeoComponents
Auto Trait Implementations§
impl Freeze for NeoComponents
impl RefUnwindSafe for NeoComponents
impl Send for NeoComponents
impl Sync for NeoComponents
impl Unpin for NeoComponents
impl UnwindSafe for NeoComponents
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> 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)
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>
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