CmdHandler

Trait CmdHandler 

Source
pub trait CmdHandler<LEN, CMD>:
    Send
    + Sync
    + 'static
where 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; }

Required Methods§

Source

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,

Implementors§

Source§

impl<LEN, CMD, ______F___, ______Fut___> CmdHandler<LEN, CMD> for ______F___
where LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static, ______F___: Send + Sync + 'static + Fn(PeerId, TunnelId, CmdHeader<LEN, CMD>, CmdBody) -> ______Fut___, ______Fut___: Future<Output = CmdResult<Option<CmdBody>>> + 'static + Send,