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§
Sourcefn recv_msg(&mut self) -> impl Future<Output = Result<Self::Message>> + Send
fn recv_msg(&mut self) -> impl Future<Output = Result<Self::Message>> + Send
Receive one complete message.
Sourcefn peer_endpoint(&self) -> Option<Endpoint>
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.