pub struct Interval {
pub months: i32,
pub days: i32,
pub micros: i64,
}Expand description
Represents a time interval or duration.
This structure can represent complex time intervals with separate components for months, days, and microseconds, allowing for precise duration calculations that account for calendar irregularities. Standard JSON has no native interval/duration type.
Fields§
§months: i32Number of months in the interval
days: i32Number of days in the interval
micros: i64Number of microseconds in the interval
Trait Implementations§
impl Eq for Interval
Source§impl Ord for Interval
impl Ord for Interval
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Interval
impl PartialOrd for Interval
impl StructuralPartialEq for Interval
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnsafeUnpin for Interval
impl UnwindSafe for Interval
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