1 2 3 4 5 6 7 8 9 10 11
use super::*; /// Async background job handler trait executed by [`Scheduler`]. pub trait JobHandler: Send + Sync + 'static { /// Executes one scheduled invocation of the job. /// /// # Returns /// /// - `Pin<Box<dyn Future<Output = Result<(), String>> + Send>>` - Async execution future. fn run(&self) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send>>; }