Struct parity_wasm::ModuleInstance
[−]
[src]
pub struct ModuleInstance { /* fields omitted */ }
Module instance.
Methods
impl ModuleInstance
[src]
fn new<'a>(
program: Weak<ProgramInstanceEssence>,
name: String,
module: Module
) -> Result<Self, Error>
[src]
program: Weak<ProgramInstanceEssence>,
name: String,
module: Module
) -> Result<Self, Error>
Instantiate given module within program context.
fn instantiate<'a>(
&mut self,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<(), Error>
[src]
&mut self,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<(), Error>
Run instantiation-time procedures (validation). Module is not completely validated until this call.
fn run_start_function(&self) -> Result<(), Error>
[src]
Run start function [if any].
Trait Implementations
impl ModuleInstanceInterface for ModuleInstance
[src]
fn execute_index(
&self,
index: u32,
params: ExecutionParams
) -> Result<Option<RuntimeValue>, Error>
[src]
&self,
index: u32,
params: ExecutionParams
) -> Result<Option<RuntimeValue>, Error>
Execute function with the given index.
fn execute_export(
&self,
name: &str,
params: ExecutionParams
) -> Result<Option<RuntimeValue>, Error>
[src]
&self,
name: &str,
params: ExecutionParams
) -> Result<Option<RuntimeValue>, Error>
Execute function with the given export name.
fn export_entry<'a>(
&self,
name: &str,
required_type: &ExportEntryType
) -> Result<Internal, Error>
[src]
&self,
name: &str,
required_type: &ExportEntryType
) -> Result<Internal, Error>
Get export entry.
fn table(&self, index: ItemIndex) -> Result<Arc<TableInstance>, Error>
[src]
Get table reference.
fn memory(&self, index: ItemIndex) -> Result<Arc<MemoryInstance>, Error>
[src]
Get memory reference.
fn global<'a>(
&self,
index: ItemIndex,
variable_type: Option<VariableType>,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<Arc<VariableInstance>, Error>
[src]
&self,
index: ItemIndex,
variable_type: Option<VariableType>,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<Arc<VariableInstance>, Error>
Get global reference.
fn function_type(
&self,
function_index: ItemIndex
) -> Result<FunctionSignature, Error>
[src]
&self,
function_index: ItemIndex
) -> Result<FunctionSignature, Error>
Get function type for given function index.
fn function_type_by_index(
&self,
type_index: u32
) -> Result<FunctionSignature, Error>
[src]
&self,
type_index: u32
) -> Result<FunctionSignature, Error>
Get function type for given function index.
fn function_reference<'a>(
&self,
index: ItemIndex,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<InternalFunctionReference<'a>, Error>
[src]
&self,
index: ItemIndex,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<InternalFunctionReference<'a>, Error>
Get function reference.
fn function_reference_indirect<'a>(
&self,
table_idx: u32,
type_idx: u32,
func_idx: u32,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<InternalFunctionReference<'a>, Error>
[src]
&self,
table_idx: u32,
type_idx: u32,
func_idx: u32,
externals: Option<&'a HashMap<String, Arc<ModuleInstanceInterface + 'a>>>
) -> Result<InternalFunctionReference<'a>, Error>
Get function indirect reference.
fn function_body<'a>(
&'a self,
internal_index: u32
) -> Result<Option<InternalFunction<'a>>, Error>
[src]
&'a self,
internal_index: u32
) -> Result<Option<InternalFunction<'a>>, Error>
Get internal function for interpretation.
fn call_internal_function(
&self,
outer: CallerContext,
index: u32
) -> Result<Option<RuntimeValue>, Error>
[src]
&self,
outer: CallerContext,
index: u32
) -> Result<Option<RuntimeValue>, Error>
Call function with given internal index.