pub trait AsyncSleep: Future<Output = Instant> {
    // Required method
    fn reset(self: Pin<&mut Self>, deadline: Instant);
}
Available on crate feature std only.
Expand description

The sleep abstraction for a runtime.

Required Methods§

source

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

Resets the Sleep instance to a new deadline.

The behavior of this function may different in different runtime implementations.

Implementors§