AsyncLocalDelayExt

Trait AsyncLocalDelayExt 

Source
pub trait AsyncLocalDelayExt<F>: AsyncLocalDelay<F>
where F: Future,
{ // Required methods fn delay(dur: Duration, fut: F) -> Self; fn delay_at(at: Self::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: Self::Instant, fut: F) -> Self

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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