Trait method lrs::io::BufRead::consume

Removes a certain number of bytes from the buffer.

Syntax

fn consume(&mut self, num: usize) -> usize

Arguments

NameDescription
num

The number of bytes to remove.

Return value

Returns the actual number of bytes removed.

Remarks

The returned value can be less than the num argument because there are fewer than num bytes currently buffered.