pub enum CoarseHourCycle {
H11H12,
H23,
}
Expand description
Used to represent either H11/H12, or H23. Skeletons only store these hour cycles as H12 or H23.
Variants§
Implementations§
Source§impl CoarseHourCycle
impl CoarseHourCycle
Sourcepub fn determine(pattern: &Pattern) -> Option<CoarseHourCycle>
pub fn determine(pattern: &Pattern) -> Option<CoarseHourCycle>
Figure out the coarse hour cycle given a pattern, which is useful for generating the provider
patterns for length::Bag
.
Sourcepub fn invert(self) -> CoarseHourCycle
pub fn invert(self) -> CoarseHourCycle
Get the other coarse hour cycle (map h11/h12 to h23/h24, and vice versa)
Trait Implementations§
Source§impl Clone for CoarseHourCycle
impl Clone for CoarseHourCycle
Source§fn clone(&self) -> CoarseHourCycle
fn clone(&self) -> CoarseHourCycle
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 Debug for CoarseHourCycle
impl Debug for CoarseHourCycle
Source§impl Default for CoarseHourCycle
Default is required for serialization. H23 is the more locale-agnostic choice, as it’s
less likely to have a day period in it.
impl Default for CoarseHourCycle
Default is required for serialization. H23 is the more locale-agnostic choice, as it’s less likely to have a day period in it.
Source§fn default() -> CoarseHourCycle
fn default() -> CoarseHourCycle
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CoarseHourCycle
impl<'de> Deserialize<'de> for CoarseHourCycle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CoarseHourCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CoarseHourCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CoarseHourCycle
impl PartialEq for CoarseHourCycle
Source§impl<'a> Yokeable<'a> for CoarseHourCyclewhere
CoarseHourCycle: Sized,
impl<'a> Yokeable<'a> for CoarseHourCyclewhere
CoarseHourCycle: Sized,
Source§type Output = CoarseHourCycle
type Output = CoarseHourCycle
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
Source§fn transform_owned(self) -> <CoarseHourCycle as Yokeable<'a>>::Output
fn transform_owned(self) -> <CoarseHourCycle as Yokeable<'a>>::Output
Source§unsafe fn make(
this: <CoarseHourCycle as Yokeable<'a>>::Output,
) -> CoarseHourCycle
unsafe fn make( this: <CoarseHourCycle as Yokeable<'a>>::Output, ) -> CoarseHourCycle
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> ZeroFrom<'zf, CoarseHourCycle> for CoarseHourCycle
impl<'zf> ZeroFrom<'zf, CoarseHourCycle> for CoarseHourCycle
Source§fn zero_from(this: &'zf CoarseHourCycle) -> CoarseHourCycle
fn zero_from(this: &'zf CoarseHourCycle) -> CoarseHourCycle
Clone the other
C
into a struct that may retain references into C
.impl Copy for CoarseHourCycle
impl StructuralPartialEq for CoarseHourCycle
Auto Trait Implementations§
impl Freeze for CoarseHourCycle
impl RefUnwindSafe for CoarseHourCycle
impl Send for CoarseHourCycle
impl Sync for CoarseHourCycle
impl Unpin for CoarseHourCycle
impl UnwindSafe for CoarseHourCycle
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