Skip to main content

Clock

Trait Clock 

Source
pub trait Clock: Send + Sync {
    // Required method
    fn now(&self) -> Timestamp;
}
Expand description

A source of the current time, replaceable in tests.

Required Methods§

Source

fn now(&self) -> Timestamp

Now, in UTC.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§