pub trait DurationExt: Sized {
// Required methods
fn as_millis(&self) -> Option<u64>;
fn mul_u64(&self, rhs: u64) -> Option<Self>;
fn div_u64(&self, rhs: u64) -> Option<Self>;
}
Expand description
Extensions to the Duration
type.
Required Methods§
Sourcefn as_millis(&self) -> Option<u64>
fn as_millis(&self) -> Option<u64>
Returns the number of whole milliseconds contained in this Duration
.
Returns None
if the value exceeds the capacity of a u64
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.