Skip to main content

Clock

Trait Clock 

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

A source of LogicalTime.

Implementations must be cheap to call and thread-safe; emission/gating logic may poll now() frequently.

Required Methods§

Source

fn now(&self) -> LogicalTime

The current logical instant.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<C: Clock + ?Sized> Clock for Arc<C>

Implementors§