pub trait ToDuration {
// Required method
fn to_duration(&self) -> TimeDelta;
}Expand description
Convert a Decimal amount of hours to a TimeDelta.
Required Methods§
Sourcefn to_duration(&self) -> TimeDelta
fn to_duration(&self) -> TimeDelta
Convert a Decimal amount of hours to a TimeDelta.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ToDuration for Decimal
impl ToDuration for Decimal
Source§fn to_duration(&self) -> TimeDelta
fn to_duration(&self) -> TimeDelta
Convert a Decimal amount of hours to a TimeDelta.
Round to the maximal precision of TimeDelta which is nanoseconds.