Skip to main content

SupportsTimers

Trait SupportsTimers 

Source
pub trait SupportsTimers {
    type Delay: Future<Output = ()> + Send + 'static;

    // Required method
    fn delay(&self, deadline: Instant) -> Self::Delay;
}
Expand description

Timers can be used on runtimes implementing this trait.

Required Associated Types§

Source

type Delay: Future<Output = ()> + Send + 'static

The type of future returned by delay.

Required Methods§

Source

fn delay(&self, deadline: Instant) -> Self::Delay

Create a future which will complete when the deadline is passed.

Implementors§