Struct basic_scheduler::BasicEvent [] [src]

pub struct BasicEvent<F, T> where
    F: FnMut(&mut T) -> Option<Duration>, 
{ pub task: F, pub state: T, }

A basic scheduled event. task will be called once when added to the scheduler. A mutable reference to state will be passed to task on each call. if task returns Some(Duration), task will be rerun after that amount of time has passed. if task returns None, the BasicEvent will be dropped

Fields

Trait Implementations

impl<F, T> Eventer for BasicEvent<F, T> where
    F: FnMut(&mut T) -> Option<Duration>, 
[src]

[src]