pub struct Engine { /* private fields */ }
Expand description
Runtime for WebAssembly
web runtime.
Trait Implementations§
source§impl<T> AsContext<Engine> for Store<T>
impl<T> AsContext<Engine> for Store<T>
source§fn as_context(&self) -> StoreContext<'_, T>
fn as_context(&self) -> StoreContext<'_, T>
Returns the store context that this type provides access to.
source§impl<'a, T: 'a> AsContext<Engine> for StoreContext<'a, T>
impl<'a, T: 'a> AsContext<Engine> for StoreContext<'a, T>
source§fn as_context(&self) -> StoreContext<'_, T>
fn as_context(&self) -> StoreContext<'_, T>
Returns the store context that this type provides access to.
source§impl<'a, T: 'a> AsContext<Engine> for StoreContextMut<'a, T>
impl<'a, T: 'a> AsContext<Engine> for StoreContextMut<'a, T>
source§fn as_context(&self) -> StoreContext<'_, T>
fn as_context(&self) -> StoreContext<'_, T>
Returns the store context that this type provides access to.
source§impl<T> AsContextMut<Engine> for Store<T>
impl<T> AsContextMut<Engine> for Store<T>
source§fn as_context_mut(&mut self) -> StoreContextMut<'_, T>
fn as_context_mut(&mut self) -> StoreContextMut<'_, T>
Returns the store context that this type provides access to.
source§impl<'a, T: 'a> AsContextMut<Engine> for StoreContextMut<'a, T>
impl<'a, T: 'a> AsContextMut<Engine> for StoreContextMut<'a, T>
source§fn as_context_mut(&mut self) -> StoreContextMut<'_, T>
fn as_context_mut(&mut self) -> StoreContextMut<'_, T>
Returns the store context that this type provides access to.
source§impl WasmEngine for Engine
impl WasmEngine for Engine
§type StoreContext<'a, T: 'a> = StoreContext<'a, T>
type StoreContext<'a, T: 'a> = StoreContext<'a, T>
The store context type.
§type StoreContextMut<'a, T: 'a> = StoreContextMut<'a, T>
type StoreContextMut<'a, T: 'a> = StoreContextMut<'a, T>
The mutable store context type.
source§impl WasmExternRef<Engine> for ExternRef
impl WasmExternRef<Engine> for ExternRef
source§impl WasmFunc<Engine> for Func
impl WasmFunc<Engine> for Func
source§impl WasmGlobal<Engine> for Global
impl WasmGlobal<Engine> for Global
source§fn new(
_ctx: impl AsContextMut<Engine>,
value: Value<Engine>,
mutable: bool
) -> Self
fn new( _ctx: impl AsContextMut<Engine>, value: Value<Engine>, mutable: bool ) -> Self
Creates a new global variable to the store.
source§fn ty(&self, _ctx: impl AsContext<Engine>) -> GlobalType
fn ty(&self, _ctx: impl AsContext<Engine>) -> GlobalType
Returns the type of the global variable.
source§impl WasmInstance<Engine> for Instance
impl WasmInstance<Engine> for Instance
source§impl WasmMemory<Engine> for Memory
impl WasmMemory<Engine> for Memory
source§fn new(_ctx: impl AsContextMut<Engine>, ty: MemoryType) -> Result<Self>
fn new(_ctx: impl AsContextMut<Engine>, ty: MemoryType) -> Result<Self>
Creates a new linear memory to the store.
source§fn ty(&self, _ctx: impl AsContext<Engine>) -> MemoryType
fn ty(&self, _ctx: impl AsContext<Engine>) -> MemoryType
Returns the memory type of the linear memory.
source§fn grow(&self, _ctx: impl AsContextMut<Engine>, additional: u32) -> Result<u32>
fn grow(&self, _ctx: impl AsContextMut<Engine>, additional: u32) -> Result<u32>
Grows the linear memory by the given amount of new pages.
source§fn current_pages(&self, _ctx: impl AsContext<Engine>) -> u32
fn current_pages(&self, _ctx: impl AsContext<Engine>) -> u32
Returns the amount of pages in use by the linear memory.
source§impl WasmModule<Engine> for Module
impl WasmModule<Engine> for Module
source§fn new(_engine: &Engine, stream: impl Read) -> Result<Self>
fn new(_engine: &Engine, stream: impl Read) -> Result<Self>
Creates a new module from the given byte stream.
source§fn exports(&self) -> Box<dyn Iterator<Item = ExportType<'_>> + '_>
fn exports(&self) -> Box<dyn Iterator<Item = ExportType<'_>> + '_>
Gets the export types of the module.
source§fn get_export(&self, name: &str) -> Option<ExternType>
fn get_export(&self, name: &str) -> Option<ExternType>
Gets the export type of the given name, if any, from this module.
source§impl<'a, T: 'a> WasmStoreContext<'a, T, Engine> for StoreContext<'a, T>
impl<'a, T: 'a> WasmStoreContext<'a, T, Engine> for StoreContext<'a, T>
source§impl<'a, T: 'a> WasmStoreContext<'a, T, Engine> for StoreContextMut<'a, T>
impl<'a, T: 'a> WasmStoreContext<'a, T, Engine> for StoreContextMut<'a, T>
source§impl<'a, T: 'a> WasmStoreContextMut<'a, T, Engine> for StoreContextMut<'a, T>
impl<'a, T: 'a> WasmStoreContextMut<'a, T, Engine> for StoreContextMut<'a, T>
source§impl WasmTable<Engine> for Table
impl WasmTable<Engine> for Table
source§fn ty(&self, _ctx: impl AsContext<Engine>) -> TableType
fn ty(&self, _ctx: impl AsContext<Engine>) -> TableType
Returns the type and limits of the table.
source§fn grow(
&self,
_ctx: impl AsContextMut<Engine>,
delta: u32,
init: Value<Engine>
) -> Result<u32>
fn grow( &self, _ctx: impl AsContextMut<Engine>, delta: u32, init: Value<Engine> ) -> Result<u32>
Grows the table by the given amount of elements.
source§fn get(
&self,
_ctx: impl AsContextMut<Engine>,
index: u32
) -> Option<Value<Engine>>
fn get( &self, _ctx: impl AsContextMut<Engine>, index: u32 ) -> Option<Value<Engine>>
Returns the table element value at index
.
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnwindSafe for Engine
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