pub trait WriteByteExt: Write {
    // Provided methods
    fn write_u8(&mut self, b: u8) -> Result<()> { ... }
    fn write_u8_escaped(&mut self, b: u8) -> Result<usize> { ... }
}
Expand description

Additional methods for std::io::Write trait to write a single byte.

Provided Methods§

source

fn write_u8(&mut self, b: u8) -> Result<()>

Writes a single byte.

source

fn write_u8_escaped(&mut self, b: u8) -> Result<usize>

Will check if first byte is SYNC_BYTE or MARK_BYTE and if it is, it will write a byte value sub 1, followed by MARK_BYTE.

Implementors§

source§

impl<W: Write + ?Sized> WriteByteExt for W