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<LinkingSectionReader<'a>, BinaryReaderError>
pub fn new( reader: BinaryReader<'a>, ) -> Result<LinkingSectionReader<'a>, BinaryReaderError>
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>
source§type Item = Result<Linking<'a>, BinaryReaderError>
type Item = Result<Linking<'a>, BinaryReaderError>
The type of the elements being iterated over.
source§type IntoIter = Subsections<'a, Linking<'a>>
type IntoIter = Subsections<'a, Linking<'a>>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <LinkingSectionReader<'a> as IntoIterator>::IntoIter
fn into_iter(self) -> <LinkingSectionReader<'a> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more