pub trait InstantProvider<D = Duration>{
// Required method
fn now() -> Self;
// Provided method
fn elapsed(&self) -> D { ... }
}
Expand description
An abstraction for retrieving the current time.
The underlying counter shell be monotonic in order for the crate to operate correctly.
Required Methods§
Provided Methods§
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.