pub trait JobQueueBackend<T>: Clone {
    type Context: Send;

    // Required methods
    fn setup<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), JobQueueError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn produce<'life0, 'async_trait>(
        &'life0 self,
        job: Job<T>
    ) -> Pin<Box<dyn Future<Output = Result<(), JobQueueError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn consume<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(Job<T>, Self::Context), JobQueueError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn done<'life0, 'async_trait>(
        &'life0 self,
        job: Job<T>,
        ctx: Self::Context
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn failed<'life0, 'async_trait>(
        &'life0 self,
        job: Job<T>,
        ctx: Self::Context
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

source

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

source

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

source

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

source

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

source

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

Implementors§