Struct wasmparser::ElementItemsReader
source · pub struct ElementItemsReader<'a> { /* private fields */ }
Expand description
A reader for element items in an element segment.
Implementations
sourceimpl<'a> ElementItemsReader<'a>
impl<'a> ElementItemsReader<'a>
sourcepub fn new(
data: &[u8],
offset: usize,
exprs: bool
) -> Result<ElementItemsReader<'_>>
pub fn new(
data: &[u8],
offset: usize,
exprs: bool
) -> Result<ElementItemsReader<'_>>
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>>
pub fn read(&mut self) -> Result<ElementItem<'a>>
Reads an element item from the segment.
Trait Implementations
sourceimpl<'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?
Auto Trait Implementations
impl<'a> RefUnwindSafe for ElementItemsReader<'a>
impl<'a> Send for ElementItemsReader<'a>
impl<'a> Sync for ElementItemsReader<'a>
impl<'a> Unpin for ElementItemsReader<'a>
impl<'a> UnwindSafe for ElementItemsReader<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more