Trait bttp::MsgCallback 
source · pub trait MsgCallback: Clone + Send + Sync + Unpin {
    type Arg<'de>: CallMsg<'de>
       where Self: 'de;
    type CallFut<'de>: Future<Output = Result<()>> + Send
       where Self: 'de;
    // Required method
    fn call<'de>(
        &'de self,
        arg: MsgReceived<Self::Arg<'de>>
    ) -> Self::CallFut<'de>;
}Expand description
Trait for types which can be called to handle messages received over the network. The server loop in Receiver uses a type that implements this trait to react to messages it receives.