pub enum CoarseHourCycle {
H11H12,
H23H24,
}
Expand description
Used to represent either H11/H12, or H23/H24. Skeletons only store these hour cycles as H12 or H23.
Variants§
H11H12
Can either be fields::Hour::H11 or fields::Hour::H12
H23H24
Can either be fields::Hour::H23 or fields::Hour::H24
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 Bake for CoarseHourCycle
impl Bake for CoarseHourCycle
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§impl BakeSize for CoarseHourCycle
impl BakeSize for CoarseHourCycle
source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
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
impl Default for CoarseHourCycle
Default is required for serialization. H23H24 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 From<HourCycle> for CoarseHourCycle
impl From<HourCycle> for CoarseHourCycle
source§fn from(value: HourCycle) -> CoarseHourCycle
fn from(value: HourCycle) -> CoarseHourCycle
Converts to this type from the input type.
source§impl PartialEq for CoarseHourCycle
impl PartialEq for CoarseHourCycle
source§impl Serialize for CoarseHourCycle
impl Serialize for CoarseHourCycle
source§fn 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
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§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