Skip to main content

JobHandler

Trait JobHandler 

Source
pub trait JobHandler: Send + Sync {
    // Required method
    fn handle(&self, task: &ScheduledTask) -> Result<(), String>;
}
Expand description

Handler invoked by the scheduler when a task’s cron expression matches the current time. Implementations must be Send + Sync because they may be invoked from a background thread.

Required Methods§

Source

fn handle(&self, task: &ScheduledTask) -> Result<(), String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§