pub trait JobHandler:
Send
+ Sync
+ 'static {
type Job: Job;
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
job: Self::Job,
ctx: JobContext,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Processes jobs of one type. Register with crate::WorkerBuilder::handler.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".