Struct wasmparser_nostd::RelocSectionReader
source · [−]pub struct RelocSectionReader<'a> { /* private fields */ }
Expand description
A reader for the relocations custom section of a WebAssembly module.
Implementations
sourceimpl<'a> RelocSectionReader<'a>
impl<'a> RelocSectionReader<'a>
sourcepub fn new(data: &'a [u8], offset: usize) -> Result<RelocSectionReader<'a>>
pub fn new(data: &'a [u8], offset: usize) -> Result<RelocSectionReader<'a>>
Constructs a new RelocSectionReader
for the given data and offset.
sourcepub fn get_section_code<'b>(&self) -> SectionCode<'b>where
'a: 'b,
pub fn get_section_code<'b>(&self) -> SectionCode<'b>where
'a: 'b,
Gets the section code from the section.
sourcepub fn original_position(&self) -> usize
pub fn original_position(&self) -> usize
Gets the original position of the reader.
Trait Implementations
sourceimpl<'a> IntoIterator for RelocSectionReader<'a>
impl<'a> IntoIterator for RelocSectionReader<'a>
type Item = Result<Reloc, BinaryReaderError>
type Item = Result<Reloc, BinaryReaderError>
The type of the elements being iterated over.
type IntoIter = SectionIteratorLimited<RelocSectionReader<'a>>
type IntoIter = SectionIteratorLimited<RelocSectionReader<'a>>
Which kind of iterator are we turning this into?
sourceimpl<'a> SectionReader for RelocSectionReader<'a>
impl<'a> SectionReader for RelocSectionReader<'a>
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
sourceimpl<'a> SectionWithLimitedItems for RelocSectionReader<'a>
impl<'a> SectionWithLimitedItems for RelocSectionReader<'a>
sourcefn into_iter_with_offsets(self) -> IntoIterWithOffsets<Self>ⓘNotable traits for IntoIterWithOffsets<R>impl<R> Iterator for IntoIterWithOffsets<R>where
R: SectionWithLimitedItems, type Item = Result<(usize, R::Item)>;
where
Self: Sized,
fn into_iter_with_offsets(self) -> IntoIterWithOffsets<Self>ⓘNotable traits for IntoIterWithOffsets<R>impl<R> Iterator for IntoIterWithOffsets<R>where
R: SectionWithLimitedItems, type Item = Result<(usize, R::Item)>;
where
Self: Sized,
R: SectionWithLimitedItems, type Item = Result<(usize, R::Item)>;
Returns an iterator over the items within this section where the offset
in the original section is provided with the item. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for RelocSectionReader<'a>
impl<'a> Send for RelocSectionReader<'a>
impl<'a> Sync for RelocSectionReader<'a>
impl<'a> Unpin for RelocSectionReader<'a>
impl<'a> UnwindSafe for RelocSectionReader<'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