pub trait Clock {
// Required method
fn now(&self) -> DateTime<Utc>;
}Expand description
Abstract clock source. Implementors must produce a DateTime<Utc> on
every call to now(). Implementors that track elapsed time (Monotonic,
Fixed) maintain their own internal anchor and must not require external
synchronisation.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".