Skip to main content

TimestampSource

Trait TimestampSource 

Source
pub trait TimestampSource: Send + Sync {
    // Required method
    fn now_timestamp_seconds(&self) -> i64;
}
Expand description

Supplies Unix timestamps for rows written by persistence adapters.

Required Methods§

Source

fn now_timestamp_seconds(&self) -> i64

Returns the current Unix timestamp in whole seconds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<TimestampFn> TimestampSource for TimestampFn
where TimestampFn: Fn() -> i64 + Send + Sync,