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§
Source§impl<'a> FromReader<'a> for Imports<'a>
impl<'a> FromReader<'a> for Imports<'a>
Source§fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
Attempts to read
Self from the provided binary reader, returning an
error if it is unable to do so.Source§impl<'a> IntoIterator for Imports<'a>
impl<'a> IntoIterator for Imports<'a>
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§
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