pub trait Clock: Clone {
type Instant: Reference;
// Required methods
fn now(&self) -> Self::Instant;
fn sleep(&self, duration: Duration) -> impl Future<Output = ()> + Send + '_;
}Expand description
A time source used by rate limiters.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".