Skip to main content

Sleep

Trait Sleep 

Source
pub trait Sleep:
    Send
    + Sync
    + Future<Output = ()> {
    // Required method
    fn reset(self: Pin<&mut Self>, new_deadline: Instant);
}
Expand description

A future returned by a Timer.

Required Methods§

Source

fn reset(self: Pin<&mut Self>, new_deadline: Instant)

Reset the future to resolve at new_deadline instead.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§