Read

Trait Read 

Source
pub trait Read {
    // Required method
    fn read_until_lf(&mut self, line: &mut Vec<u8>) -> Result<bool>;
}
Expand description

Trait for reading configurations.

Ordinarily you won’t need to implement this trait, since it is already implemented by any T implementing std::io::BufRead (or else &str and &[u8], if the std feature is not enabled).

Required Methods§

Source

fn read_until_lf(&mut self, line: &mut Vec<u8>) -> Result<bool>

Read up to the next line feed (or EOF), not including the line feed itself.

Puts the line in line and returns Ok(true). If the end of file has been reached, line is unmodified and Ok(false) is returned.

You don’t need to check for valid UTF-8 here — that is already done in the code which uses this trait.

Implementors§

Source§

impl<R: BufRead> Read for R