pub trait RecvProtocol {
    type CustomErr: Debug + Send;

    // Required method
    fn recv<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<ProtocolEvent, ProtocolError<Self::CustomErr>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generic Network Recv Protocol. See: SendProtocol

Required Associated Types§

Required Methods§

source

fn recv<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<ProtocolEvent, ProtocolError<Self::CustomErr>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Either recv an event or fail the Protocol, once the Recv side is closed it cannot recover from the error.

Implementors§

source§

impl<S> RecvProtocol for MpscRecvProtocol<S>
where S: UnreliableSink<DataFormat = MpscMsg>,

source§

impl<S> RecvProtocol for QuicRecvProtocol<S>
where S: UnreliableSink<DataFormat = QuicDataFormat>,

source§

impl<S> RecvProtocol for TcpRecvProtocol<S>
where S: UnreliableSink<DataFormat = BytesMut>,