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