hopr_transport_protocol::msg::processor

Trait PacketUnwrapping

Source
pub trait PacketUnwrapping {
    type Packet;

    // Required method
    fn recv<'life0, 'life1, 'async_trait>(
        &'life0 self,
        peer: &'life1 PeerId,
        data: Box<[u8]>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Packet>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn recv<'life0, 'life1, 'async_trait>( &'life0 self, peer: &'life1 PeerId, data: Box<[u8]>, ) -> Pin<Box<dyn Future<Output = Result<Self::Packet>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<Db> PacketUnwrapping for PacketProcessor<Db>
where Db: HoprDbProtocolOperations + Send + Sync + Debug + Clone,