pub struct TimeLengths<'data> {
pub time_h11_h12: LengthPatterns<'data>,
pub time_h23_h24: LengthPatterns<'data>,
pub preferred_hour_cycle: CoarseHourCycle,
}
Expand description
Pattern data for times.
๐ This item has a stack size of 264 bytes on the stable toolchain at release date.
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Fieldsยง
ยงtime_h11_h12: LengthPatterns<'data>
These patterns are common uses of time formatting, broken down by the length of the pattern. Users can override the hour cycle with a preference, so there are two pattern groups stored here. Note that the pattern will contain either h11 or h12.
time_h23_h24: LengthPatterns<'data>
These patterns are common uses of time formatting, broken down by the length of the pattern. Users can override the hour cycle with a preference, so there are two pattern groups stored here. Note that the pattern will contain either h23 or h24.
preferred_hour_cycle: CoarseHourCycle
By default a locale will prefer one hour cycle type over another.
Trait Implementationsยง
Sourceยงimpl<'data> Clone for TimeLengths<'data>
impl<'data> Clone for TimeLengths<'data>
Sourceยงfn clone(&self) -> TimeLengths<'data>
fn clone(&self) -> TimeLengths<'data>
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<'data> Debug for TimeLengths<'data>
impl<'data> Debug for TimeLengths<'data>
Sourceยงimpl<'data> Default for TimeLengths<'data>
impl<'data> Default for TimeLengths<'data>
Sourceยงfn default() -> TimeLengths<'data>
fn default() -> TimeLengths<'data>
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'de, 'data> Deserialize<'de> for TimeLengths<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for TimeLengths<'data>where
'de: 'data,
Sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeLengths<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeLengths<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl MaybeAsVarULE for TimeLengths<'_>
impl MaybeAsVarULE for TimeLengths<'_>
Sourceยงimpl<'data> PartialEq for TimeLengths<'data>
impl<'data> PartialEq for TimeLengths<'data>
Sourceยงimpl<'a> Yokeable<'a> for TimeLengths<'static>
impl<'a> Yokeable<'a> for TimeLengths<'static>
Sourceยงtype Output = TimeLengths<'a>
type Output = TimeLengths<'a>
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
Sourceยงfn transform_owned(self) -> <TimeLengths<'static> as Yokeable<'a>>::Output
fn transform_owned(self) -> <TimeLengths<'static> as Yokeable<'a>>::Output
Sourceยงunsafe fn make(
this: <TimeLengths<'static> as Yokeable<'a>>::Output,
) -> TimeLengths<'static>
unsafe fn make( this: <TimeLengths<'static> as Yokeable<'a>>::Output, ) -> TimeLengths<'static>
This method can be used to cast away
Self<'a>
โs lifetime. Read moreSourceยงfn transform_mut<F>(&'a mut self, f: F)
fn transform_mut<F>(&'a mut self, f: F)
This method must cast
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moreSourceยงimpl<'zf, 'zf_inner> ZeroFrom<'zf, TimeLengths<'zf_inner>> for TimeLengths<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, TimeLengths<'zf_inner>> for TimeLengths<'zf>
Sourceยงfn zero_from(this: &'zf TimeLengths<'zf_inner>) -> TimeLengths<'zf>
fn zero_from(this: &'zf TimeLengths<'zf_inner>) -> TimeLengths<'zf>
Clone the other
C
into a struct that may retain references into C
.impl<'data> StructuralPartialEq for TimeLengths<'data>
Auto Trait Implementationsยง
impl<'data> Freeze for TimeLengths<'data>
impl<'data> RefUnwindSafe for TimeLengths<'data>
impl<'data> Send for TimeLengths<'data>
impl<'data> Sync for TimeLengths<'data>
impl<'data> Unpin for TimeLengths<'data>
impl<'data> UnwindSafe for TimeLengths<'data>
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ยง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