pub struct Days(_);
Expand description
A duration in calendar days.
This is useful because when using Duration
it is possible
that adding Duration::days(1)
doesn’t increment the day value as expected due to it being a
fixed number of seconds. This difference applies only when dealing with DateTime<TimeZone>
data types
and in other cases Duration::days(n)
and Days::new(n)
are equivalent.
Implementations
Trait Implementations
sourceimpl Add<Days> for NaiveDateTime
impl Add<Days> for NaiveDateTime
sourceimpl PartialOrd<Days> for Days
impl PartialOrd<Days> for Days
sourcefn partial_cmp(&self, other: &Days) -> Option<Ordering>
fn partial_cmp(&self, other: &Days) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl Sub<Days> for NaiveDateTime
impl Sub<Days> for NaiveDateTime
impl Copy for Days
impl Eq for Days
impl StructuralEq for Days
impl StructuralPartialEq for Days
Auto Trait Implementations
impl RefUnwindSafe for Days
impl Send for Days
impl Sync for Days
impl Unpin for Days
impl UnwindSafe for Days
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more