pub enum Hours {}
Expand description
A TimeResolution
implementation that truncates time measurements to
hours. Internally, the number of hours is represented as an i32
,
allowing a range of +/- ~245,147 years.
Trait Implementations§
§impl TimeResolution for Hours
impl TimeResolution for Hours
§type Representation = i32
type Representation = i32
The in-memory and serialized representation for this resolution.
§const FORMAT_SUFFIX: &'static str = "h"
const FORMAT_SUFFIX: &'static str = "h"
The label used when formatting times with this resolution.
§fn repr_to_duration(
value: <Hours as TimeResolution>::Representation
) -> Result<SignedDuration, TimeError>
fn repr_to_duration( value: <Hours as TimeResolution>::Representation ) -> Result<SignedDuration, TimeError>
Converts a
Self::Representation
to Duration
.§fn duration_to_repr(
duration: SignedDuration
) -> Result<<Hours as TimeResolution>::Representation, TimeError>
fn duration_to_repr( duration: SignedDuration ) -> Result<<Hours as TimeResolution>::Representation, TimeError>
Converts a
Duration
to Self::Representation
.Auto Trait Implementations§
impl RefUnwindSafe for Hours
impl Send for Hours
impl Sync for Hours
impl Unpin for Hours
impl UnwindSafe for Hours
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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