pub trait Clock:
Debug
+ Send
+ Sync {
// Required method
fn now(&self) -> Timestamp;
}Expand description
The domain’s only source of “now”.
b1’s Definition of Done requires that recovery decisions be testable with
no real time dependency, so every function in this crate that compares
timestamps takes one of these rather than calling the system clock.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".