Enum Imports
pub enum Imports<'a> {
Single(usize, Import<'a>),
Compact1 {
module: &'a str,
items: SectionLimited<'a, ImportItemCompact<'a>>,
},
Compact2 {
module: &'a str,
ty: TypeRef,
names: SectionLimited<'a, &'a str>,
},
}Expand description
Represents a group of imports in a WebAssembly module.
Variants§
Single(usize, Import<'a>)
The group contains a single import.
Compact1
The group contains many imports that share the same module name, but have different types.
Fields
§
items: SectionLimited<'a, ImportItemCompact<'a>>The imported items.
Compact2
The group contains many imports that share the same module name and type.
Trait Implementations§
§impl<'a> FromReader<'a> for Imports<'a>
impl<'a> FromReader<'a> for Imports<'a>
§fn from_reader(
reader: &mut BinaryReader<'a>,
) -> Result<Imports<'a>, BinaryReaderError>
fn from_reader( reader: &mut BinaryReader<'a>, ) -> Result<Imports<'a>, BinaryReaderError>
Attempts to read
Self from the provided binary reader, returning an
error if it is unable to do so.§impl<'a> IntoIterator for Imports<'a>
impl<'a> IntoIterator for Imports<'a>
§type Item = Result<(usize, Import<'a>), BinaryReaderError>
type Item = Result<(usize, Import<'a>), BinaryReaderError>
The type of the elements being iterated over.
§type IntoIter = ImportsIter<'a>
type IntoIter = ImportsIter<'a>
Which kind of iterator are we turning this into?
Auto Trait Implementations§
impl<'a> Freeze for Imports<'a>
impl<'a> RefUnwindSafe for Imports<'a>
impl<'a> Send for Imports<'a>
impl<'a> Sync for Imports<'a>
impl<'a> Unpin for Imports<'a>
impl<'a> UnwindSafe for Imports<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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