pub fn toss(r: *Reader, n: usize) void
Skips the next n bytes from the stream, advancing the seek position. This is typically and safely used after peek.
n
peek
Asserts that the number of bytes buffered is at least as many as n.
The "tossed" memory remains alive until a "peek" operation occurs.
See also:
discard
r: *Reader
n: usize
549 550 551 552
pub fn toss(r: *Reader, n: usize) void { r.seek += n; assert(r.seek <= r.end); }
Skips the next
nbytes from the stream, advancing the seek position. This is typically and safely used afterpeek.Asserts that the number of bytes buffered is at least as many as
n.The "tossed" memory remains alive until a "peek" operation occurs.
See also:
peek.discard.