pub struct Duration {
pub minutes: Number,
pub hours: Number,
pub days: Number,
pub weeks: Number,
pub months: Number,
pub years: Number,
}
Expand description
Represents a specific duration of time that is not anchored at any particular point in time.
Note that individual components, if not specified, will be recorded as 0
. Such components
will not appear when the Duration is rendered, printed, or displayed.
Fields§
§minutes: Number
The number of minutes.
hours: Number
The number of hours.
days: Number
The number of days.
weeks: Number
The number of weeks.
months: Number
The number of months.
years: Number
The number of years.
Trait Implementations§
source§impl Ord for Duration
impl Ord for Duration
source§impl PartialEq for Duration
impl PartialEq for Duration
source§impl PartialOrd for Duration
impl PartialOrd for Duration
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Duration
impl Eq for Duration
impl StructuralEq for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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