pub trait CmdHandler<LEN, CMD>:
Send
+ Sync
+ 'staticwhere
LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive,
CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static,{
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
tunnel_id: TunnelId,
header: CmdHeader<LEN, CMD>,
body: CmdBody,
) -> Pin<Box<dyn Future<Output = CmdResult<Option<CmdBody>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}