Skip to main content

AsyncWriteExt

Trait AsyncWriteExt 

Source
pub trait AsyncWriteExt: AsyncWrite {
    // Provided method
    fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self> 
       where Self: Unpin { ... }
}
Expand description

Extension trait for AsyncWrite providing utility methods.

Provided Methods§

Source

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where Self: Unpin,

Writes all bytes from the source buffer to this writer.

Calls poll_write repeatedly until the entire buffer has been written.

§Errors

Returns an error if writing fails or if zero bytes are written (indicating the writer is closed).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§