Skip to main content

BoxedTimer

Trait BoxedTimer 

Source
pub trait BoxedTimer {
    // Required methods
    fn now_boxed(&self) -> BoxInstant;
    fn sleep_boxed(&self, d: Duration) -> BoxSleep;
}
Expand description

Timer, with the sleep boxed and the instant behind ErasedInstant.

Required Methods§

Source

fn now_boxed(&self) -> BoxInstant

Timer::now, as a stamp that outlives the borrow.

Source

fn sleep_boxed(&self, d: Duration) -> BoxSleep

Timer::sleep, boxed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Tm> BoxedTimer for Tm
where Tm: Timer + Clone + 'static, Tm::Sleep: 'static,