Schedule

Trait Schedule 

Source
pub trait Schedule {
    // Required method
    fn next_call_at(
        &self,
        last_run_at: Option<SystemTime>,
    ) -> Option<SystemTime>;
}
Expand description

The trait that all schedules implement.

Required Methods§

Source

fn next_call_at(&self, last_run_at: Option<SystemTime>) -> Option<SystemTime>

Compute when a task should be executed again. If this method returns None then the task should never run again and it is safe to remove it from the list of scheduled tasks.

Implementors§