pub trait Handler {
// Required methods
fn on_header<'life0, 'life1, 'async_trait>(
&'life0 mut self,
mi: &'life1 MsgInfo,
) -> Pin<Box<dyn Future<Output = Result<(StoreType, StoreType), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_data<'life0, 'async_trait>(
&'life0 mut self,
msg: Msg,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Implements callback methods for incoming message header and payloads.
The recv_h function and the recvloop_h require an object which
implements this trait.
Required Methods§
Sourcefn on_header<'life0, 'life1, 'async_trait>(
&'life0 mut self,
mi: &'life1 MsgInfo,
) -> Pin<Box<dyn Future<Output = Result<(StoreType, StoreType), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_header<'life0, 'life1, 'async_trait>(
&'life0 mut self,
mi: &'life1 MsgInfo,
) -> Pin<Box<dyn Future<Output = Result<(StoreType, StoreType), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once a message header has been received to allow the application to choose how to store the meta and payload content.