pub trait AsyncLocalDelayExt<F>: Future<Output = Result<F::Output, Aborted>>
where F: Future,
{ // Required methods fn delay(dur: Duration, fut: F) -> Self; fn delay_at(at: Instant, fut: F) -> Self; }
Available on crate feature time only.
Expand description

Extension trait for AsyncLocalDelay

Required Methods§

source

fn delay(dur: Duration, fut: F) -> Self

Create a new delay, the future will be polled after the duration has elapsed

source

fn delay_at(at: Instant, fut: F) -> Self

Create a new delay, the future will be polled after the instant has elapsed

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F, S> AsyncLocalDelayExt<F> for Delay<F, S>