pub trait CurrentTimestamp: Default {
// Required methods
fn current_timestamp(&self) -> i64;
fn set_current_timestamp(&self, timestamp: i64);
}Expand description
Provides the current timestamp in milliseconds since the Unix epoch.
Required Methods§
Sourcefn current_timestamp(&self) -> i64
fn current_timestamp(&self) -> i64
Returns the current timestamp in milliseconds since the Unix epoch.
Sourcefn set_current_timestamp(&self, timestamp: i64)
fn set_current_timestamp(&self, timestamp: i64)
Sets the current timestamp in milliseconds 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.