Reads bytes from a Read object and writes them to the stream until end-of-file.
fn read_to_eof<R>(&mut self, r: R) -> Result<usize, Errno> where R: Read,
| Name | Description |
|---|---|
| r | The object from which to read. |
Returns the number of bytes written.
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.