pub trait Clock {
// Required method
fn now(&self) -> Instant;
}Expand description
“What time is it now”, injected so tests need not sleep.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".