pub struct ManualTimestamp { /* private fields */ }Expand description
Implementation of the CurrentTimestamp trait using a manual timestamp.
Useful for testing purposes.
Implementations§
Trait Implementations§
Source§impl CurrentTimestamp for ManualTimestamp
impl CurrentTimestamp for ManualTimestamp
Source§fn current_timestamp(&self) -> Option<i64>
fn current_timestamp(&self) -> Option<i64>
Returns the current timestamp in nanoseconds since the Unix epoch.
Source§fn set_current_timestamp(&self, timestamp: i64)
fn set_current_timestamp(&self, timestamp: i64)
Sets the current timestamp in nanoseconds since the Unix epoch.
Source§impl Default for ManualTimestamp
impl Default for ManualTimestamp
Source§fn default() -> ManualTimestamp
fn default() -> ManualTimestamp
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ManualTimestamp
impl !RefUnwindSafe for ManualTimestamp
impl Send for ManualTimestamp
impl Sync for ManualTimestamp
impl Unpin for ManualTimestamp
impl UnwindSafe for ManualTimestamp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more