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§
source§impl TimeResolution for Hours
impl TimeResolution for Hours
§type Representation = i32
type Representation = i32
The in-memory and serialized representation for this resolution.
source§const FORMAT_SUFFIX: &'static str = "h"
const FORMAT_SUFFIX: &'static str = "h"
The label used when formatting times with this resolution.
source§fn repr_to_duration(
value: Self::Representation
) -> Result<SignedDuration, TimeError>
fn repr_to_duration( value: Self::Representation ) -> Result<SignedDuration, TimeError>
Converts a
Self::Representation
to Duration
.source§fn duration_to_repr(
duration: SignedDuration
) -> Result<Self::Representation, TimeError>
fn duration_to_repr( duration: SignedDuration ) -> Result<Self::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§
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