pub struct Interval {
pub years: i64,
pub months: i64,
pub days: i64,
pub hours: i64,
pub minutes: i64,
pub seconds: f64,
}
Fields§
§years: i64
§months: i64
§days: i64
§hours: i64
§minutes: i64
§seconds: f64
Implementations§
Source§impl Interval
impl Interval
pub fn add(&self, other: &Interval) -> Result<Interval, String>
pub fn sub(&self, other: &Interval) -> Result<Interval, String>
pub fn mul(&self, other: i64) -> Result<Interval, String>
pub fn div(&self, other: i64) -> Result<Interval, String>
pub fn to_seconds(&self) -> i64
Trait Implementations§
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 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