Skip to main content

ReadExt

Trait ReadExt 

Source
pub trait ReadExt: Read {
    // Provided methods
    fn read_struct<T: Zeroable + NoUninit + AnyBitPattern>(
        &mut self,
    ) -> Result<T> { ... }
    fn parse<T: Parsable>(&mut self) -> Result<T>
       where Self: Sized { ... }
}
Expand description

Structured-reading helpers.

Provided Methods§

Source

fn read_struct<T: Zeroable + NoUninit + AnyBitPattern>(&mut self) -> Result<T>

Read an arbitrary-bit-pattern value.

Source

fn parse<T: Parsable>(&mut self) -> Result<T>
where Self: Sized,

Parse a value with its custom parser.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Read + ?Sized> ReadExt for T