Skip to main content

MessageRx

Trait MessageRx 

Source
pub trait MessageRx: Send + Sync {
    type Message: Send + Sync;

    // Required methods
    fn recv_msg(&mut self) -> impl Future<Output = Result<Self::Message>> + Send;
    fn peer_endpoint(&self) -> Option<Endpoint>;
}
Expand description

Read half of a message connection.

Required Associated Types§

Required Methods§

Source

fn recv_msg(&mut self) -> impl Future<Output = Result<Self::Message>> + Send

Receive one complete message.

Source

fn peer_endpoint(&self) -> Option<Endpoint>

Remote peer address.

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§