Skip to main content

ConduitRx

Trait ConduitRx 

Source
pub trait ConduitRx {
    type Msg: MsgFamily;
    type Error: Error + MaybeSend + 'static;

    // Required method
    fn recv(
        &mut self,
    ) -> impl Future<Output = Result<Option<SelfRef<<Self::Msg as MsgFamily>::Msg<'static>>>, Self::Error>> + MaybeSend + '_;
}
Expand description

Receiving half of a Conduit.

Yields decoded values as SelfRef<Msg<'static>> (value + backing storage). Uses a precomputed TypePlanCore for fast plan-driven deserialization.

Required Associated Types§

Required Methods§

Source

fn recv( &mut self, ) -> impl Future<Output = Result<Option<SelfRef<<Self::Msg as MsgFamily>::Msg<'static>>>, Self::Error>> + MaybeSend + '_

Receive and decode the next message.

Returns Ok(None) when the peer has closed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§