#[repr(u64)]pub enum Units {
Seconds = 1,
Minutes = 60,
Hours = 3_600,
Days = 86_400,
Weeks = 604_800,
Months = 2_678_400,
Years = 31_536_000,
}Expand description
Possible units for a component of a relative time.
Intended to be used with Reltime::format and Reltime::format_with_timetable to control
units are selected to decompose a Reltime value for formatting. See those method for
details.
Variants§
Seconds = 1
Minutes = 60
Hours = 3_600
Days = 86_400
Weeks = 604_800
Months = 2_678_400
Years = 31_536_000
Trait Implementations§
impl Copy for Units
impl Eq for Units
Source§impl Ord for Units
impl Ord for Units
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Units
impl PartialOrd for Units
impl StructuralPartialEq for Units
Auto Trait Implementations§
impl Freeze for Units
impl RefUnwindSafe for Units
impl Send for Units
impl Sync for Units
impl Unpin for Units
impl UnsafeUnpin for Units
impl UnwindSafe for Units
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