pub fn fill(r: *Reader, n: usize) Error!void r: *Readern: usizeReadFailedSee the Reader implementation for detailed diagnostics.
EndOfStream1109
1110
1111
1112
1113
1114
1115pub fn fill(r: *Reader, n: usize) Error!void {
if (r.seek + n <= r.end) {
@branchHint(.likely);
return;
}
return fillUnbuffered(r, n);
}
Fills the buffer such that it contains at least
nbytes, without advancing the seek position.Returns
error.EndOfStreamif and only if there are fewer thannbytes remaining.If the end of stream is not encountered, asserts buffer capacity is at least
n.