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 Hash for Days
impl Hash for Days
sourcefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Feeds a slice of this type into the given [
Hasher
]. Read moresourceimpl PartialOrd<Days> for Days
impl PartialOrd<Days> for Days
sourceimpl 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
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more