Trait BincodeSend

Source
pub trait BincodeSend:
    Sink<ProtocolMessage>
    + AsyncWrite
    + AsyncWriteExt
    + Unpin
    + Sized {
    // Provided method
    fn push(&mut self, message: ProtocolMessage) -> impl Future<Output = Void> { ... }
}
Expand description

A trait for sending protocol messages over a stream.

This impl is designed to ensure that the push method can only be used to send ProtocolMessage messages. This restriction is important for type safety and to ensure that all messages sent through the stream follow the protocol format and are properly encrypted if necessary.

Provided Methods§

Source

fn push(&mut self, message: ProtocolMessage) -> impl Future<Output = Void>

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§