pub trait MessageTx: Send + Sync {
type Message: Send + Sync;
// Required methods
fn send_msg(
&mut self,
msg: Self::Message,
) -> impl Future<Output = Result<()>> + Send;
fn peer_endpoint(&self) -> Option<Endpoint>;
}Expand description
Write half of a message connection.
Required Associated Types§
Required Methods§
Sourcefn send_msg(
&mut self,
msg: Self::Message,
) -> impl Future<Output = Result<()>> + Send
fn send_msg( &mut self, msg: Self::Message, ) -> impl Future<Output = Result<()>> + Send
Send 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.