Trait lines_u8::BufReadExt
source · pub trait BufReadExt: BufRead + Sized {
fn read_line_u8(&mut self, buf: &mut Vec<u8>) -> Result<usize> { ... }
fn lines_u8(self) -> LinesIter<Self> ⓘ { ... }
}
Provided Methods§
sourcefn read_line_u8(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_line_u8(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Like read_until
, but fetches the next line, consumes \r, \n, or \r\n.
The buf will not contain the newline, but the count will include 1 or 2 bytes for it, so if the count is 0 we are at EOF.