pub trait ToDuration {
// Required methods
fn seconds(&self) -> Duration;
fn days(&self) -> Duration;
fn weeks(&self) -> Duration;
fn months(&self) -> Duration;
fn years(&self) -> Duration;
}Expand description
Helper trait to convert integer counts into Durations.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".