Skip to main content

ReadExt

Trait ReadExt 

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

Structured-reading helpers.

Provided Methods§

Source

fn read_struct<T>(&mut self) -> Result<T, Error>

Read an arbitrary-bit-pattern value.

Source

fn parse<T>(&mut self) -> Result<T, Error>
where T: Parsable, 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> ReadExt for T
where T: Read + ?Sized,