pub trait Clock {
// Required method
fn now(&self) -> Duration;
}Expand description
A deterministic source of evaluation time supplied by the caller.
Implementations may use synchronization primitives when they need mutable state, but the provider is owned by the specification that receives it. There is no ambient or global clock.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".