Skip to main content

TurnClock

Trait TurnClock 

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

Source of the runtime’s own clock, so a turn is testable without waiting.

Required Methods§

Source

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

Now.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§