pub enum Weeks {}
Expand description
A TimeResolution
implementation that truncates time measurements to
weeks. Internally, the number of weeks is represented as an i32
,
allowing a range of +/- ~41.18 million years.
Trait Implementations§
source§impl TimeResolution for Weeks
impl TimeResolution for Weeks
§type Representation = i32
type Representation = i32
The in-memory and serialized representation for this resolution.
source§const FORMAT_SUFFIX: &'static str = "w"
const FORMAT_SUFFIX: &'static str = "w"
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 Weeks
impl Send for Weeks
impl Sync for Weeks
impl Unpin for Weeks
impl UnwindSafe for Weeks
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