pub trait Clock:
Send
+ Sync
+ 'static {
// Required method
fn now(&self) -> Duration;
}Expand description
Supplies monotonic elapsed time to a MemoryStore.
A clock implementation must never intentionally move backwards. The store nevertheless clamps values to the greatest time observed by each touched shard, which also makes deterministic test clocks straightforward.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".