Struct wasmparser::LinkingSectionReader
source · pub struct LinkingSectionReader<'a> { /* private fields */ }
Expand description
A reader for the linking
custom section of a WebAssembly module.
This format is currently defined upstream at https://github.com/WebAssembly/tool-conventions/blob/main/Linking.md.
Implementations§
source§impl<'a> LinkingSectionReader<'a>
impl<'a> LinkingSectionReader<'a>
sourcepub fn new(reader: BinaryReader<'a>) -> Result<Self>
pub fn new(reader: BinaryReader<'a>) -> Result<Self>
Creates a new reader for the linking section contents starting at
offset
within the original wasm file.
sourcepub fn version(&self) -> u32
pub fn version(&self) -> u32
Returns the version of linking metadata contained in this section.
sourcepub fn original_position(&self) -> usize
pub fn original_position(&self) -> usize
Returns the original byte offset of this section.
sourcepub fn range(&self) -> Range<usize>
pub fn range(&self) -> Range<usize>
Returns the range, as byte offsets, of this section within the original wasm binary.
sourcepub fn subsections(&self) -> Subsections<'a, Linking<'a>> ⓘ
pub fn subsections(&self) -> Subsections<'a, Linking<'a>> ⓘ
Returns the iterator for advancing through the subsections.
You can also use IntoIterator::into_iter
directly on this type.
Trait Implementations§
source§impl<'a> Clone for LinkingSectionReader<'a>
impl<'a> Clone for LinkingSectionReader<'a>
source§fn clone(&self) -> LinkingSectionReader<'a>
fn clone(&self) -> LinkingSectionReader<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for LinkingSectionReader<'a>
impl<'a> Debug for LinkingSectionReader<'a>
source§impl<'a> IntoIterator for LinkingSectionReader<'a>
impl<'a> IntoIterator for LinkingSectionReader<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinkingSectionReader<'a>
impl<'a> RefUnwindSafe for LinkingSectionReader<'a>
impl<'a> Send for LinkingSectionReader<'a>
impl<'a> Sync for LinkingSectionReader<'a>
impl<'a> Unpin for LinkingSectionReader<'a>
impl<'a> UnwindSafe for LinkingSectionReader<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)