Skip to main content

MessageTx

Trait MessageTx 

Source
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§

Source

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

Send 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§