pub trait SleepTrait: Future<Output = ()> + Send + Sync + Debug {
    // Required methods
    fn is_elapsed(&self) -> bool;
    fn reset(self: Pin<&mut Self>, duration: Duration);
    fn reset_until(self: Pin<&mut Self>, deadline: Instant);
}

Required Methods§

source

fn is_elapsed(&self) -> bool

Returns true if this Sleep’s requested wait duration has elapsed.

source

fn reset(self: Pin<&mut Self>, duration: Duration)

Resets this Sleep to wait again for duration.

source

fn reset_until(self: Pin<&mut Self>, deadline: Instant)

Reset this Sleep to wait again until the deadline.

Implementors§