Trait method lrs::io::BufWrite::read_to_eof

Reads bytes from a Read object and writes them to the stream until end-of-file.

Syntax

fn read_to_eof<R>(&mut self, r: R) -> Result<usize, Errno>
   where R: Read,

Arguments

NameDescription
r

The object from which to read.

Return value

Returns the number of bytes written.

Remarks

If an error occurs, the error is returned immediately and the number of bytes copied is lost. No data is lost even if an error occurs.