pub trait Timers: Clock {
type TimerLayout;
type Timer;
// Required methods
fn timer_layout(&mut self) -> Result<Self::TimerLayout, Self::Error>;
fn set_timeout_on(
&mut self,
timer: Self::Timer,
relative: Duration,
) -> Result<(), Self::Error>;
fn clear_timeout_on(
&mut self,
timer: Self::Timer,
) -> Result<(), Self::Error>;
}Required Associated Types§
type TimerLayout
type Timer
Required Methods§
fn timer_layout(&mut self) -> Result<Self::TimerLayout, Self::Error>
fn set_timeout_on( &mut self, timer: Self::Timer, relative: Duration, ) -> Result<(), Self::Error>
fn clear_timeout_on(&mut self, timer: Self::Timer) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".