pub trait HasTime: Async {
type Time: Async;
// Required methods
fn now(&self) -> Self::Time;
fn duration_since(
current_time: &Self::Time,
other_time: &Self::Time,
) -> Duration;
}Required Associated Types§
Required Methods§
fn now(&self) -> Self::Time
fn duration_since( current_time: &Self::Time, other_time: &Self::Time, ) -> Duration
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.