pub trait Clock: Send + Sync {
// Required method
fn now(&self) -> Timestamp;
}Expand description
Source of the current time.
Inject a custom implementation in tests to make every expiration, throttle
and timeout window deterministic. Production code uses SystemClock.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".