omnom

Trait ReadExt

Source
pub trait ReadExt: Read + Sized {
    // Provided methods
    fn read_be<B: ReadBytes>(&mut self) -> Result<B> { ... }
    fn read_le<B: ReadBytes>(&mut self) -> Result<B> { ... }
    fn read_ne<B: ReadBytes>(&mut self) -> Result<B> { ... }
}
Expand description

Extension trait to Read to read bytes using endianness.

Provided Methods§

Source

fn read_be<B: ReadBytes>(&mut self) -> Result<B>

Read bytes as big endian.

Source

fn read_le<B: ReadBytes>(&mut self) -> Result<B>

Read bytes as little endian.

Source

fn read_ne<B: ReadBytes>(&mut self) -> Result<B>

Read bytes using native endianness.

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§

Source§

impl<T: Read> ReadExt for T