Struct wasmparser::ComponentNameSectionReader
source · pub struct ComponentNameSectionReader<'a> { /* private fields */ }
Expand description
A reader for the name custom section of a WebAssembly module.
Implementations
sourceimpl<'a> ComponentNameSectionReader<'a>
impl<'a> ComponentNameSectionReader<'a>
sourcepub fn new(
data: &'a [u8],
offset: usize
) -> Result<ComponentNameSectionReader<'a>>
pub fn new(
data: &'a [u8],
offset: usize
) -> Result<ComponentNameSectionReader<'a>>
Constructs a new ComponentNameSectionReader
from the given data and offset.
sourcepub fn original_position(&self) -> usize
pub fn original_position(&self) -> usize
Gets the original position of the section reader.
sourcepub fn read(&mut self) -> Result<ComponentName<'a>>
pub fn read(&mut self) -> Result<ComponentName<'a>>
Reads a name from the section.
Trait Implementations
sourceimpl<'a> IntoIterator for ComponentNameSectionReader<'a>
impl<'a> IntoIterator for ComponentNameSectionReader<'a>
type Item = Result<ComponentName<'a>, BinaryReaderError>
type Item = Result<ComponentName<'a>, BinaryReaderError>
The type of the elements being iterated over.
type IntoIter = SectionIterator<ComponentNameSectionReader<'a>>
type IntoIter = SectionIterator<ComponentNameSectionReader<'a>>
Which kind of iterator are we turning this into?
sourceimpl<'a> SectionReader for ComponentNameSectionReader<'a>
impl<'a> SectionReader for ComponentNameSectionReader<'a>
type Item = ComponentName<'a>
type Item = ComponentName<'a>
The item returned by the reader.
sourcefn original_position(&self) -> usize
fn original_position(&self) -> usize
Gets the original position of the reader.
sourcefn ensure_end(&self) -> Result<()>
fn ensure_end(&self) -> Result<()>
Ensures the reader is at the end of the section. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for ComponentNameSectionReader<'a>
impl<'a> Send for ComponentNameSectionReader<'a>
impl<'a> Sync for ComponentNameSectionReader<'a>
impl<'a> Unpin for ComponentNameSectionReader<'a>
impl<'a> UnwindSafe for ComponentNameSectionReader<'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