#[repr(u8)]
pub enum Hour {
H11,
H12,
H23,
H24,
}
Expand description
An enum for the possible symbols of an hour field in a date pattern.
Variants
H11
Field symbol for numeric hour [0-11].
This field symbol is represented by the character K
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H12
Field symbol for numeric hour [1-12].
This field symbol is represented by the character h
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H23
Field symbol for numeric hour [0-23].
This field symbol is represented by the character H
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H24
Field symbol for numeric hour [1-24].
This field symbol is represented by the character k
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Trait Implementations
sourceimpl Bake for Hour
impl Bake for Hour
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'de> Deserialize<'de> for Hour
impl<'de> Deserialize<'de> for Hour
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Hour, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Hour, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Hour> for FieldSymbol
impl From<Hour> for FieldSymbol
sourcefn from(input: Hour) -> FieldSymbol
fn from(input: Hour) -> FieldSymbol
Converts to this type from the input type.
sourceimpl Ord for Hour
impl Ord for Hour
sourceimpl PartialOrd<Hour> for Hour
impl PartialOrd<Hour> for Hour
sourcefn partial_cmp(&self, other: &Hour) -> Option<Ordering>
fn partial_cmp(&self, other: &Hour) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Hour
impl Serialize for Hour
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'a> Yokeable<'a> for Hour
impl<'a> Yokeable<'a> for Hour
sourcefn transform(&self) -> &<Hour as Yokeable<'a>>::Output
fn transform(&self) -> &<Hour as Yokeable<'a>>::Output
This method must cast self
between &'a Self<'static>
and &'a Self<'a>
. Read more
sourcefn transform_owned(self) -> <Hour as Yokeable<'a>>::Output
fn transform_owned(self) -> <Hour as Yokeable<'a>>::Output
This method must cast self
between Self<'static>
and Self<'a>
. Read more
sourceimpl<'a> ZeroMapKV<'a> for Hour
impl<'a> ZeroMapKV<'a> for Hour
impl Copy for Hour
impl Eq for Hour
impl<'a> IsCovariant<'a> for Hour
impl StructuralEq for Hour
impl StructuralPartialEq for Hour
Auto Trait Implementations
impl RefUnwindSafe for Hour
impl Send for Hour
impl Sync for Hour
impl Unpin for Hour
impl UnwindSafe for Hour
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more