pub enum InstantiateModule {
Static(StaticModuleIndex, Box<[CoreDef]>),
Import(RuntimeImportIndex, IndexMap<String, IndexMap<String, CoreDef>>),
}
Expand description
Different methods of instantiating a core wasm module.
Variants§
Static(StaticModuleIndex, Box<[CoreDef]>)
A module defined within this component is being instantiated.
Note that this is distinct from the case of imported modules because the order of imports required is statically known and can be pre-calculated to avoid string lookups related to names at runtime, represented by the flat list of arguments here.
Import(RuntimeImportIndex, IndexMap<String, IndexMap<String, CoreDef>>)
An imported module is being instantiated.
This is similar to Upvar
but notably the imports are provided as a
two-level named map since import resolution order needs to happen at
runtime.
Trait Implementations§
source§impl Debug for InstantiateModule
impl Debug for InstantiateModule
source§impl<'de> Deserialize<'de> for InstantiateModule
impl<'de> Deserialize<'de> for InstantiateModule
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InstantiateModule
impl RefUnwindSafe for InstantiateModule
impl Send for InstantiateModule
impl Sync for InstantiateModule
impl Unpin for InstantiateModule
impl UnwindSafe for InstantiateModule
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