pub trait Clock: Sized + Send {
// Required method
fn get_time(&self) -> Result<Duration>;
// Provided method
fn start_timer<'s>(&'s self) -> Result<Timer<'s, Self>> { ... }
}
Required Methods§
Provided Methods§
Sourcefn start_timer<'s>(&'s self) -> Result<Timer<'s, Self>>
fn start_timer<'s>(&'s self) -> Result<Timer<'s, Self>>
Start a timer at the current time
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.