pub trait EventHandler: Send + Sync {
// Required methods
fn on_error<'life0, 'async_trait>(
&'life0 self,
handler_id: String,
conn: Arc<dyn GmqConnection>,
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,
handler_id: String,
conn: Arc<dyn GmqConnection>,
status: Status,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
The event handler for connections.