Skip to main content

JobHandle

Trait JobHandle 

Source
pub trait JobHandle:
    Send
    + Sync
    + 'static {
    type Err: Debug;

    // Required methods
    fn ack_job<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn nack_job<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait to manager job timeouts and (n)acks

Required Associated Types§

Source

type Err: Debug

Type of errors that can occur

Required Methods§

Source

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

Ack the job referred by this JobHandle

Source

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

N-ack the job referred by this JobHandle, this must trigger a requeue if the amount of tries has not exceeded the maximum amount

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§