Struct ModuleInst

Source
pub struct ModuleInst<'b> {
    pub types: Vec<FuncType>,
    pub func_addrs: Vec<usize>,
    pub table_addrs: Vec<usize>,
    pub mem_addrs: Vec<usize>,
    pub global_addrs: Vec<usize>,
    pub elem_addrs: Vec<usize>,
    pub data_addrs: Vec<usize>,
    pub exports: BTreeMap<String, ExternVal>,
    pub wasm_bytecode: &'b [u8],
    pub sidetable: Vec<SidetableEntry>,
}
Expand description

Fields§

§types: Vec<FuncType>§func_addrs: Vec<usize>§table_addrs: Vec<usize>§mem_addrs: Vec<usize>§global_addrs: Vec<usize>§elem_addrs: Vec<usize>§data_addrs: Vec<usize>§exports: BTreeMap<String, ExternVal>

https://webassembly.github.io/spec/core/exec/runtime.html#export-instances matches the list of ExportInst structs in the spec, however the spec never uses the name attribute except during linking, which is up to the embedder to implement. therefore this is a map data structure instead.

§wasm_bytecode: &'b [u8]§sidetable: Vec<SidetableEntry>

Trait Implementations§

Source§

impl<'b> Debug for ModuleInst<'b>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'b> Freeze for ModuleInst<'b>

§

impl<'b> RefUnwindSafe for ModuleInst<'b>

§

impl<'b> Send for ModuleInst<'b>

§

impl<'b> Sync for ModuleInst<'b>

§

impl<'b> Unpin for ModuleInst<'b>

§

impl<'b> UnwindSafe for ModuleInst<'b>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.