Trait JobHandler
Source pub trait JobHandler: Send + Sync {
// Required methods
fn job_type(&self) -> JobType<'static>;
fn execute<'life0, 'async_trait>(
&'life0 self,
context: JobContext,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<(), JobFailure>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn on_dead_letter<'life0, 'async_trait>(
&'life0 self,
_context: JobContext,
_payload: Value,
_dead_letter: JobDeadLetterInfo,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}