Function readSliceAll [src]
Fill buffer with the next buffer.len bytes from the stream, advancing
the seek position.
Invalidates previously returned values from peek.
If the provided buffer cannot be filled completely, error.EndOfStream is
returned instead.
See also:
peek
readSliceShort
Prototype
pub fn readSliceAll(r: *Reader, buffer: []u8) Error!void
Parameters
r: *Reader
buffer: []u8
Possible Errors
See the Reader
implementation for detailed diagnostics.
Source
pub fn readSliceAll(r: *Reader, buffer: []u8) Error!void {
const n = try readSliceShort(r, buffer);
if (n != buffer.len) return error.EndOfStream;
}