Trait wasmtime_environ::wasmparser::SectionReader
source · [−]pub trait SectionReader {
type Item;
fn read(&mut self) -> Result<Self::Item, BinaryReaderError>;
fn eof(&self) -> bool;
fn original_position(&self) -> usize;
fn range(&self) -> Range<usize>ⓘNotable traits for Range<A>impl<A> Iterator for Range<A> where
A: Step, type Item = A;
;
fn ensure_end(&self) -> Result<(), BinaryReaderError> { ... }
}
Expand description
A trait implemented by section readers.
Associated Types
Required methods
fn read(&mut self) -> Result<Self::Item, BinaryReaderError>
fn read(&mut self) -> Result<Self::Item, BinaryReaderError>
Reads an item from the section.
fn original_position(&self) -> usize
fn original_position(&self) -> usize
Gets the original position of the reader.
Provided methods
fn ensure_end(&self) -> Result<(), BinaryReaderError>
fn ensure_end(&self) -> Result<(), BinaryReaderError>
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.