Trait ReadByteExt

Source
pub trait ReadByteExt: Read {
    // Provided methods
    fn read_u8(&mut self) -> Result<u8> { ... }
    fn read_u8_escaped(&mut self) -> Result<u8> { ... }
}
Expand description

Additional methods for std::io::Read trait to read a single (escaped) byte.

Provided Methods§

Source

fn read_u8(&mut self) -> Result<u8>

Reads a single byte.

Source

fn read_u8_escaped(&mut self) -> Result<u8>

Check if the first byte is MARK_BYTE and if it is, it will read the next byte and add one to it.

Implementors§

Source§

impl<R: Read + ?Sized> ReadByteExt for R