pub trait Job: Send {
// Required method
fn run(&self) -> Result<(), String>;
// Provided method
fn name(&self) -> &str { ... }
}Available on crate feature
jobs only.Expand description
A unit of background work.
Implement run directly for named, stateful jobs, or rely on the blanket
implementation below to submit a plain closure.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".