Struct cranelift_wasm::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<'_>, 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
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?
sourcefn 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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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