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

Like AsyncSleep, but does not requires Send.

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§

source§

impl AsyncLocalSleep for AsyncIoSleep

Available on crate feature async-io only.
source§

impl AsyncLocalSleep for TokioSleep

Available on crate feature tokio only.
source§

impl AsyncLocalSleep for WasmSleep

Available on crate feature wasm only.