Trait BinaryReader

Source
pub trait BinaryReader: BufRead {
    // Required methods
    fn read_string<R>(
        &mut self,
        f: impl FnOnce(&str) -> R,
    ) -> Result<R, DecodeError>;
    fn read_u16(&mut self) -> Result<u16, DecodeError>;
    fn pop(&mut self) -> Result<u8, DecodeError>;
}

Required Methods§

Source

fn read_string<R>( &mut self, f: impl FnOnce(&str) -> R, ) -> Result<R, DecodeError>

Source

fn read_u16(&mut self) -> Result<u16, DecodeError>

Source

fn pop(&mut self) -> Result<u8, DecodeError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§