Skip to main content

Interval

Trait Interval 

Source
pub trait Interval: Send + 'static {
    // Required method
    fn tick(&mut self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>;
}
Expand description

A periodic timer that can be polled or awaited.

Required Methods§

Source

fn tick(&mut self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

Wait for the next tick of the interval.

Implementors§