Trait ddmw_client::msg::recv::Handler [−][src]
pub trait Handler {
fn on_header<'life0, 'life1, 'async_trait>(
&'life0 self,
mi: &'life1 MsgInfo
) -> Pin<Box<dyn Future<Output = Result<(StoreType, StoreType), Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn on_data<'life0, 'async_trait>(
&'life0 self,
msg: Msg
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: '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
Called once a message header has been received to allow the application to choose how to store the meta and payload content.