Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn now(&self) -> Result<u64, StoreError>;
}
Expand description

Where a publish learns the time.

Required Methods§

Source

fn now(&self) -> Result<u64, StoreError>

The time now, in whole seconds since the Unix epoch.

§Errors

The time cannot be read.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§