pub trait JobHandler: Send + Sync {
// Required method
fn handle(&self, task: &ScheduledTask) -> Result<(), String>;
}Expand description
调度器根级 re-export(供 core 内部 dogfood 使用)
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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".