general_mq::queue

Trait EventHandler

Source
pub trait EventHandler: Send + Sync {
    // Required methods
    fn on_error<'life0, 'async_trait>(
        &'life0 self,
        queue: Arc<dyn GmqQueue>,
        err: Box<dyn StdError + Send + Sync>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_status<'life0, 'async_trait>(
        &'life0 self,
        queue: Arc<dyn GmqQueue>,
        status: Status,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The event handler for queues.

Required Methods§

Source

fn on_error<'life0, 'async_trait>( &'life0 self, queue: Arc<dyn GmqQueue>, err: Box<dyn StdError + Send + Sync>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Triggered when there are errors.

Source

fn on_status<'life0, 'async_trait>( &'life0 self, queue: Arc<dyn GmqQueue>, status: Status, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Triggered by Status.

Implementors§