Trait method lrs::fmt::Write::write_all

Tries to write the complete buffer to the byte-stream.

Syntax

fn write_all(&mut self, buf: &[u8]) -> Result<usize, Errno>

Arguments

NameDescription
buf

The buffer to be written.

Return value

Returns the total number of bytes written.

Remarks

The default implementation calls write multiple times until the whole buffer has been written. If an error occurs, the error is returned immediately and the number of bytes written is lost. This method should thus not be used in reliable applications.