Struct cranelift_wasm::wasmparser::ElementItemsReader
source · pub struct ElementItemsReader<'a> { /* private fields */ }
Expand description
A reader for element items in an element segment.
Implementations§
source§impl<'a> ElementItemsReader<'a>
impl<'a> ElementItemsReader<'a>
sourcepub fn new(
data: &[u8],
offset: usize,
exprs: bool
) -> Result<ElementItemsReader<'_>, BinaryReaderError>
pub fn new(
data: &[u8],
offset: usize,
exprs: bool
) -> Result<ElementItemsReader<'_>, BinaryReaderError>
Constructs a new ElementItemsReader
for the given data and offset.
sourcepub fn original_position(&self) -> usize
pub fn original_position(&self) -> usize
Gets the original position of the reader.
sourcepub fn uses_exprs(&self) -> bool
pub fn uses_exprs(&self) -> bool
Whether or not initialization expressions are used.
sourcepub fn read(&mut self) -> Result<ElementItem<'a>, BinaryReaderError>
pub fn read(&mut self) -> Result<ElementItem<'a>, BinaryReaderError>
Reads an element item from the segment.
Trait Implementations§
source§impl<'a> IntoIterator for ElementItemsReader<'a>
impl<'a> IntoIterator for ElementItemsReader<'a>
§type Item = Result<ElementItem<'a>, BinaryReaderError>
type Item = Result<ElementItem<'a>, BinaryReaderError>
The type of the elements being iterated over.
§type IntoIter = ElementItemsIterator<'a>
type IntoIter = ElementItemsIterator<'a>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <ElementItemsReader<'a> as IntoIterator>::IntoIter
fn into_iter(self) -> <ElementItemsReader<'a> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more