Trait std::io::BufReadExtUnstable [-] [+] [src]

pub trait BufReadExt: BufRead + Sized {
    fn split(self, byte: u8) -> Split<Self> { ... }
    fn lines(self) -> Lines<Self> { ... }
}

Extension methods for all instances of BufRead, typically imported through std::io::prelude::*.

Provided Methods

fn split(self, byte: u8) -> Split<Self>

Returns an iterator over the contents of this reader split on the byte byte.

The iterator returned from this function will return instances of io::Result<Vec<u8>>. Each vector returned will not have the delimiter byte at the end.

This function will yield errors whenever read_until would have also yielded an error.

fn lines(self) -> Lines<Self>

Returns an iterator over the lines of this reader.

The iterator returned from this function will yield instances of io::Result<String>. Each string returned will not have a newline byte (the 0xA byte) at the end.

This function will yield errors whenever read_string would have also yielded an error.

Implementors