pub struct Days { /* private fields */ }Expand description
Representation of a duration to an accuracy of Days. Useful whenever some duration is known
or needs to be known only to an accuracy of one day - for example, in calendrical computations.
Implementations§
Source§impl Days
impl Days
Sourcepub const fn count(&self) -> i32
pub const fn count(&self) -> i32
Returns the raw number of time units contained in this Days. It is advised not to
use this function unless absolutely necessary, as it effectively throws away all time unit
information and safety.
Sourcepub const fn into_duration(&self) -> Duration
pub const fn into_duration(&self) -> Duration
Returns the Duration equivalent to this number of days.
Trait Implementations§
Source§impl AddAssign<Days> for Date
impl AddAssign<Days> for Date
Source§fn add_assign(&mut self, rhs: Days)
fn add_assign(&mut self, rhs: Days)
Performs the
+= operation. Read moreSource§impl AddAssign for Days
impl AddAssign for Days
Source§fn add_assign(&mut self, rhs: Days)
fn add_assign(&mut self, rhs: Days)
Performs the
+= operation. Read moreSource§impl Ord for Days
impl Ord for Days
Source§impl PartialOrd for Days
impl PartialOrd for Days
Source§impl SubAssign<Days> for Date
impl SubAssign<Days> for Date
Source§fn sub_assign(&mut self, rhs: Days)
fn sub_assign(&mut self, rhs: Days)
Performs the
-= operation. Read moreSource§impl SubAssign for Days
impl SubAssign for Days
Source§fn sub_assign(&mut self, rhs: Days)
fn sub_assign(&mut self, rhs: Days)
Performs the
-= operation. Read moreimpl Copy for Days
impl Eq for Days
impl StructuralPartialEq for Days
Auto Trait Implementations§
impl Freeze for Days
impl RefUnwindSafe for Days
impl Send for Days
impl Sync for Days
impl Unpin for Days
impl UnwindSafe for Days
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