pub fn discardAll(r: *Reader, n: usize) Error!void
Skips the next n bytes from the stream, advancing the seek position.
n
Unlike toss which is infallible, in this function n can be any amount.
toss
Returns error.EndOfStream if fewer than n bytes could be discarded.
error.EndOfStream
See also:
discardRemaining
discardShort
discard
r: *Reader
n: usize
ReadFailed
See the Reader implementation for detailed diagnostics.
Reader
EndOfStream
611 612 613
pub fn discardAll(r: *Reader, n: usize) Error!void { if ((try r.discardShort(n)) != n) return error.EndOfStream; }
Skips the next
nbytes from the stream, advancing the seek position.Unlike
tosswhich is infallible, in this functionncan be any amount.Returns
error.EndOfStreamif fewer thannbytes could be discarded.See also:
tossdiscardRemainingdiscardShortdiscard