Trait Enumerable

Source
pub trait Enumerable {
    // Required method
    fn read<R: BufReaderExt>(&mut self, reader: &mut R) -> Result<()>;
}
Expand description

Trait for types that can be read sequentially from a buffered reader.

Types implementing this trait can be read using the read_enumerable method from BufReaderExt.

Required Methods§

Source

fn read<R: BufReaderExt>(&mut self, reader: &mut R) -> Result<()>

Reads data from the given reader and updates the implementing type.

§Arguments
  • reader - A mutable reference to any type that implements BufReaderExt
§Errors
  • If the reader fails to read the exact number of bytes ReadError

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§