Skip to main content

Processor

Trait Processor 

Source
pub trait Processor:
    Send
    + Sync
    + 'static {
    type Job: Job;

    // Required method
    fn process<'life0, 'async_trait>(
        &'life0 self,
        job: Self::Job,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A returned Err marks the job failed; the backend retries up to the #[process(retries = N)] budget.

Required Associated Types§

Required Methods§

Source

fn process<'life0, 'async_trait>( &'life0 self, job: Self::Job, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§