pub trait Clock { // Required method fn now(&self) -> Option<Timestamp>; }
A service to get the current Timestamp.
Timestamp
Read the current Timestamp.
This method may return None if the clock couldn’t be read for any reason. That may be because the clock doesn’t actually supporting reading now, time moving backwards, or any other reason that could result in an inaccurate reading.
None
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
alloc