Trait CurrentTimestamp

Source
pub trait CurrentTimestamp: Default {
    // Required methods
    fn current_timestamp(&self) -> Option<i64>;
    fn set_current_timestamp(&self, timestamp: i64);
}
Expand description

Provides the current timestamp in nanoseconds since the Unix epoch.

Required Methods§

Source

fn current_timestamp(&self) -> Option<i64>

Returns the current timestamp in nanoseconds since the Unix epoch.

Source

fn set_current_timestamp(&self, timestamp: i64)

Sets the current timestamp in nanoseconds since the Unix epoch.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§