Enum icu::datetime::neo_skeleton::NeoTimeComponents
source · #[non_exhaustive]pub enum NeoTimeComponents {
Time,
Time12,
Time24,
}
Expand description
A specification for a set of parts of a time. Only sets that yield “sensible” time are allowed: this type cannot describe a time such as “am, 5 minutes, 25 milliseconds”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Time
A time of day (12-hour or 24-hour chosen by locale),
with the precision chosen by TimePrecision
Time12
A time of day with a 12-hour clock,
with the precision chosen by TimePrecision
Time24
A time of day with a 24-hour clock,
with the precision chosen by TimePrecision
Implementations§
source§impl NeoTimeComponents
impl NeoTimeComponents
sourcepub const VALUES: &'static [NeoTimeComponents] = _
pub const VALUES: &'static [NeoTimeComponents] = _
All values of this enum.
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<NeoTimeComponents>
pub fn from_id_str(id_str: &DataMarkerAttributes) -> Option<NeoTimeComponents>
Returns the set of components for the given stable string.
For details, see NeoDateComponents::from_id_str()
.
sourcepub fn long(self) -> NeoTimeSkeleton
pub fn long(self) -> NeoTimeSkeleton
Creates a skeleton for this field set with a long length.
sourcepub fn medium(self) -> NeoTimeSkeleton
pub fn medium(self) -> NeoTimeSkeleton
Creates a skeleton for this field set with a medium length.
sourcepub fn short(self) -> NeoTimeSkeleton
pub fn short(self) -> NeoTimeSkeleton
Creates a skeleton for this field set with a short length.
Trait Implementations§
source§impl Clone for NeoTimeComponents
impl Clone for NeoTimeComponents
source§fn clone(&self) -> NeoTimeComponents
fn clone(&self) -> NeoTimeComponents
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NeoTimeComponents
impl Debug for NeoTimeComponents
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<NeoTimeComponents> for NeoDateTimeComponents
impl From<NeoTimeComponents> for NeoDateTimeComponents
source§fn from(value: NeoTimeComponents) -> NeoDateTimeComponents
fn from(value: NeoTimeComponents) -> NeoDateTimeComponents
source§impl Hash for NeoTimeComponents
impl Hash for NeoTimeComponents
source§impl PartialEq for NeoTimeComponents
impl PartialEq for NeoTimeComponents
impl Copy for NeoTimeComponents
impl Eq for NeoTimeComponents
impl StructuralPartialEq for NeoTimeComponents
Auto Trait Implementations§
impl Freeze for NeoTimeComponents
impl RefUnwindSafe for NeoTimeComponents
impl Send for NeoTimeComponents
impl Sync for NeoTimeComponents
impl Unpin for NeoTimeComponents
impl UnwindSafe for NeoTimeComponents
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