Skip to main content

ByteWrite

Trait ByteWrite 

Source
pub trait ByteWrite {
    // Required methods
    fn write_all<'a>(
        &'a mut self,
        buf: &'a [u8],
    ) -> impl Future<Output = TransportResult<()>> + Send + 'a;
    fn flush(&mut self) -> impl Future<Output = TransportResult<()>> + Send + '_;
}
Expand description

The write half of a split stream.

Required Methods§

Source

fn write_all<'a>( &'a mut self, buf: &'a [u8], ) -> impl Future<Output = TransportResult<()>> + Send + 'a

Write every byte of buf, or fail.

Source

fn flush(&mut self) -> impl Future<Output = TransportResult<()>> + Send + '_

Flush any buffered bytes toward the peer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§