pub trait SectionReader {
    type Item;

    fn read(&mut self) -> Result<Self::Item>;
    fn eof(&self) -> bool;
    fn original_position(&self) -> usize;
    fn range(&self) -> Range<usize>;

    fn ensure_end(&self) -> Result<()> { ... }
}
Expand description

A trait implemented by section readers.

Required Associated Types

The item returned by the reader.

Required Methods

Reads an item from the section.

Determines if the reader is at end-of-section.

Gets the original position of the reader.

Gets the range of the reader.

Provided Methods

Ensures the reader is at the end of the section.

This methods returns an error if there is more data in the section than what is described by the section’s header.

Implementors