pub trait ModuleInternal: Send + Sync {
Show 15 methods
// Required methods
fn is_instruction_count_instrumented(&self) -> bool;
fn heap_spec(&self) -> Option<&HeapSpec>;
fn globals(&self) -> &[GlobalSpec<'_>];
fn get_sparse_page_data(&self, page: usize) -> Option<&[u8]>;
fn sparse_page_data_len(&self) -> usize;
fn table_elements(&self) -> Result<&[TableElement], Error>;
fn get_export_func(&self, sym: &str) -> Result<FunctionHandle, Error>;
fn get_func_from_idx(
&self,
table_id: u32,
func_id: u32,
) -> Result<FunctionHandle, Error>;
fn get_start_func(&self) -> Result<Option<FunctionHandle>, Error>;
fn function_manifest(&self) -> &[FunctionSpec];
fn addr_details(
&self,
addr: *const c_void,
) -> Result<Option<AddrDetails>, Error>;
fn get_signature(&self, fn_id: FunctionIndex) -> &Signature;
// Provided methods
fn function_handle_from_ptr(&self, ptr: FunctionPointer) -> FunctionHandle { ... }
fn lookup_trapcode(&self, rip: *const c_void) -> Option<TrapCode> { ... }
fn validate_runtime_spec(&self, limits: &Limits) -> Result<(), Error> { ... }
}
Required Methods§
Sourcefn is_instruction_count_instrumented(&self) -> bool
fn is_instruction_count_instrumented(&self) -> bool
Determine whether this module has been instrumented with additional instructions that monitor the number of wasm operations executed during runtime.
fn heap_spec(&self) -> Option<&HeapSpec>
Sourcefn globals(&self) -> &[GlobalSpec<'_>]
fn globals(&self) -> &[GlobalSpec<'_>]
Get the WebAssembly globals of the module.
The indices into the returned slice correspond to the WebAssembly indices of the globals (https://webassembly.github.io/spec/core/syntax/modules.html#syntax-globalidx)
fn get_sparse_page_data(&self, page: usize) -> Option<&[u8]>
Sourcefn sparse_page_data_len(&self) -> usize
fn sparse_page_data_len(&self) -> usize
Get the number of pages in the sparse page data.
Sourcefn table_elements(&self) -> Result<&[TableElement], Error>
fn table_elements(&self) -> Result<&[TableElement], Error>
Get the table elements from the module.