Enum icu_datetime::options::preferences::HourCycle
source ยท pub enum HourCycle {
H24,
H23,
H12,
H11,
}
Expand description
A user preference for adjusting how the hour component is displayed.
๐ง This code is experimental; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. It can be enabled with the `experimental` Cargo feature
of the icu meta-crate. Use with caution.
#1317
Variantsยง
H24
Hour is formatted to be in range 1-24 where midnight is 24:00.
ยงExamples
"24:12";
"8:23";
"19:00";
"23:21";
H23
Hour is formatted to be in range 0-23 where midnight is 00:00.
ยงExamples
"0:12";
"8:23";
"19:00";
"23:21";
H12
Hour is formatted to be in range 1-12 where midnight is 12:00.
ยงExamples
"1:12";
"8:23";
"7:00";
"11:21";
H11
Hour is formatted to be in range 0-11 where midnight is 00:00.
ยงExamples
"0:12";
"8:23";
"7:00";
"11:21";
Implementationsยง
Trait Implementationsยง
sourceยงimpl<'de> Deserialize<'de> for HourCycle
impl<'de> Deserialize<'de> for HourCycle
sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceยงimpl From<HourCycle> for CoarseHourCycle
impl From<HourCycle> for CoarseHourCycle
impl Copy for HourCycle
impl Eq for HourCycle
impl StructuralPartialEq for HourCycle
Auto Trait Implementationsยง
impl Freeze for HourCycle
impl RefUnwindSafe for HourCycle
impl Send for HourCycle
impl Sync for HourCycle
impl Unpin for HourCycle
impl UnwindSafe for HourCycle
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