Tries to read bytes until the buffer is buffer.
fn read_all(&mut self, buf: &mut [u8]) -> Result<usize, Errno>
| Name | Description |
|---|---|
| buf | The buffer that will be filled. |
Returns the total number of bytes read.
The default implementation calls read multiple times until the buffer is full or 0 is returned. If an error occurs the error is returned immediately and all bytes read up to that point are lost. This convenience method should thus not be used in reliable programs.