Trait BincodeReceive

Source
pub trait BincodeReceive:
    Stream<Item = Result<ProtocolMessage>>
    + AsyncRead
    + AsyncReadExt
    + Unpin
    + Sized {
    // Provided method
    fn pull(&mut self) -> impl Future<Output = Res<ProtocolMessage>> { ... }
}
Expand description

A trait for receiving protocol messages over a stream.

This impl is designed to ensure that the pull method can only be used to receive ProtocolMessage messages.

Provided Methods§

Source

fn pull(&mut self) -> impl Future<Output = Res<ProtocolMessage>>

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§

Source§

impl<T> BincodeReceive for T
where Self: Stream<Item = Result<ProtocolMessage>> + AsyncRead + Unpin + Sized,