Struct wasmtime_environ::ModuleLocal [−][src]
Local information known about a wasm module, the bare minimum necessary to translate function bodies.
This is stored within a Module and it implements Hash, unlike Module,
and is used as part of the cache key when we load compiled modules from the
global cache.
Fields
signatures: PrimaryMap<SignatureIndex, (WasmFuncType, Signature)>Unprocessed signatures exactly as provided by declare_signature().
num_imported_funcs: usizeNumber of imported functions in the module.
num_imported_tables: usizeNumber of imported tables in the module.
num_imported_memories: usizeNumber of imported memories in the module.
num_imported_globals: usizeNumber of imported globals in the module.
functions: PrimaryMap<FuncIndex, SignatureIndex>Types of functions, imported and local.
table_plans: PrimaryMap<TableIndex, TablePlan>WebAssembly tables.
memory_plans: PrimaryMap<MemoryIndex, MemoryPlan>WebAssembly linear memory plans.
globals: PrimaryMap<GlobalIndex, Global>WebAssembly global variables.
Implementations
impl ModuleLocal[src]
pub fn func_index(&self, defined_func: DefinedFuncIndex) -> FuncIndex[src]
Convert a DefinedFuncIndex into a FuncIndex.
pub fn defined_func_index(&self, func: FuncIndex) -> Option<DefinedFuncIndex>[src]
Convert a FuncIndex into a DefinedFuncIndex. Returns None if the
index is an imported function.
pub fn is_imported_function(&self, index: FuncIndex) -> bool[src]
Test whether the given function index is for an imported function.
pub fn table_index(&self, defined_table: DefinedTableIndex) -> TableIndex[src]
Convert a DefinedTableIndex into a TableIndex.
pub fn defined_table_index(
&self,
table: TableIndex
) -> Option<DefinedTableIndex>[src]
&self,
table: TableIndex
) -> Option<DefinedTableIndex>
Convert a TableIndex into a DefinedTableIndex. Returns None if the
index is an imported table.
pub fn is_imported_table(&self, index: TableIndex) -> bool[src]
Test whether the given table index is for an imported table.
pub fn memory_index(&self, defined_memory: DefinedMemoryIndex) -> MemoryIndex[src]
Convert a DefinedMemoryIndex into a MemoryIndex.
pub fn defined_memory_index(
&self,
memory: MemoryIndex
) -> Option<DefinedMemoryIndex>[src]
&self,
memory: MemoryIndex
) -> Option<DefinedMemoryIndex>
Convert a MemoryIndex into a DefinedMemoryIndex. Returns None if the
index is an imported memory.
pub fn is_imported_memory(&self, index: MemoryIndex) -> bool[src]
Test whether the given memory index is for an imported memory.
pub fn global_index(&self, defined_global: DefinedGlobalIndex) -> GlobalIndex[src]
Convert a DefinedGlobalIndex into a GlobalIndex.
pub fn defined_global_index(
&self,
global: GlobalIndex
) -> Option<DefinedGlobalIndex>[src]
&self,
global: GlobalIndex
) -> Option<DefinedGlobalIndex>
Convert a GlobalIndex into a DefinedGlobalIndex. Returns None if the
index is an imported global.
pub fn is_imported_global(&self, index: GlobalIndex) -> bool[src]
Test whether the given global index is for an imported global.
pub fn native_func_signature(&self, func_index: FuncIndex) -> &Signature[src]
Convenience method for looking up the native signature of a compiled Wasm function.
pub fn wasm_func_type(&self, func_index: FuncIndex) -> &WasmFuncType[src]
Convenience method for looking up the original Wasm signature of a function.
Trait Implementations
impl Debug for ModuleLocal[src]
impl<'de> Deserialize<'de> for ModuleLocal[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Hash for ModuleLocal[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Serialize for ModuleLocal[src]
Auto Trait Implementations
impl RefUnwindSafe for ModuleLocal
impl Send for ModuleLocal
impl Sync for ModuleLocal
impl Unpin for ModuleLocal
impl UnwindSafe for ModuleLocal
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CallHasher for T where
T: Hash, [src]
T: Hash,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T[src]
pub const ALIGN: usize[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T[src]
pub unsafe fn drop(ptr: usize)[src]
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,