pub trait AcknowledgeToken {
    type AckError;
    type NackError;
    type ModifyError;

    // Required methods
    fn ack<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::AckError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn nack<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::NackError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn modify_deadline<'life0, 'async_trait>(
        &'life0 mut self,
        seconds: u32
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::ModifyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A token associated with some message received from a message service, used to issue an ack/nack/modify request

See the documentation for acknowledging messages on Consumer

Required Associated Types§

source

type AckError

Errors returned by ack

source

type NackError

Errors returned by nack

source

type ModifyError

Errors returned by modify_deadline

Required Methods§

source

fn ack<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::AckError>> + Send + 'async_trait>>
where Self: 'async_trait,

Acknowledge the associated message

source

fn nack<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::NackError>> + Send + 'async_trait>>
where Self: 'async_trait,

Negatively acknowledge the associated message

source

fn modify_deadline<'life0, 'async_trait>( &'life0 mut self, seconds: u32 ) -> Pin<Box<dyn Future<Output = Result<(), Self::ModifyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Change the associated message’s acknowledge deadline to the given number of seconds

Implementors§