Skip to main content

Clock

Trait Clock 

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

Source of wall-clock time for components that must observe real time.

Required Methods§

Source

fn now(&self) -> DateTime<Utc>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§