sylvia_iot_broker::libs::mq::application

Trait EventHandler

Source
pub trait EventHandler: Send + Sync {
    // Required methods
    fn on_status_change<'life0, 'life1, 'async_trait>(
        &'life0 self,
        mgr: &'life1 ApplicationMgr,
        status: MgrStatus,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_dldata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        mgr: &'life1 ApplicationMgr,
        data: Box<DlData>,
    ) -> Pin<Box<dyn Future<Output = Result<Box<DlDataResp>, ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Event handler trait for the ApplicationMgr.

Required Methods§

Source

fn on_status_change<'life0, 'life1, 'async_trait>( &'life0 self, mgr: &'life1 ApplicationMgr, status: MgrStatus, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_dldata<'life0, 'life1, 'async_trait>( &'life0 self, mgr: &'life1 ApplicationMgr, data: Box<DlData>, ) -> Pin<Box<dyn Future<Output = Result<Box<DlDataResp>, ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§