Timer

Trait Timer 

Source
pub trait Timer {
    type Context;

    // Required method
    fn fire(&mut self, now: Instant, ctx: &mut Self::Context) -> Option<Instant>;

    // Provided method
    fn is_periodic(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn fire(&mut self, now: Instant, ctx: &mut Self::Context) -> Option<Instant>

Provided Methods§

Source

fn is_periodic(&self) -> bool

Hint for dual-wheel routing. Override to return true for periodic timers.

Implementors§