pub trait DateTimeDiff {
// Provided methods
fn years(&self) -> i32 { ... }
fn months(&self) -> i32 { ... }
fn days(&self) -> i32 { ... }
fn hours(&self) -> i32 { ... }
fn minutes(&self) -> i32 { ... }
fn seconds(&self) -> i32 { ... }
fn nanoseconds(&self) -> i32 { ... }
}Expand description
A trait to represent a date-time difference with multiple units.
Provided Methods§
fn years(&self) -> i32
fn months(&self) -> i32
fn days(&self) -> i32
fn hours(&self) -> i32
fn minutes(&self) -> i32
fn seconds(&self) -> i32
fn nanoseconds(&self) -> i32
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".