Skip to main content

RuntimeClockSource

Trait RuntimeClockSource 

Source
pub trait RuntimeClockSource {
    // Required method
    fn now(&self) -> Instant;

    // Provided method
    fn advance(&self, _duration: Duration) -> bool { ... }
}

Required Methods§

Source

fn now(&self) -> Instant

Provided Methods§

Source

fn advance(&self, _duration: Duration) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§