pub struct Engine { /* private fields */ }Expand description
Runtime for WebAssembly web runtime.
Trait Implementations§
Source§impl<T: 'static> AsContext<Engine> for Store<T>
impl<T: 'static> 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: 'static> AsContextMut<Engine> for Store<T>
impl<T: 'static> 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
Source§type StoreContext<'a, T: 'static> = StoreContext<'a, T>
type StoreContext<'a, T: 'static> = StoreContext<'a, T>
The store context type.
Source§type StoreContextMut<'a, T: 'static> = StoreContextMut<'a, T>
type StoreContextMut<'a, T: 'static> = 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, bytes: &[u8]) -> Result<Self>
fn new(_engine: &Engine, bytes: &[u8]) -> Result<Self>
Creates a new module from the given byte slice.
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: 'static> WasmStoreContext<'a, T, Engine> for StoreContext<'a, T>
impl<'a, T: 'static> WasmStoreContext<'a, T, Engine> for StoreContext<'a, T>
Source§impl<'a, T: 'static> WasmStoreContext<'a, T, Engine> for StoreContextMut<'a, T>
impl<'a, T: 'static> WasmStoreContext<'a, T, Engine> for StoreContextMut<'a, T>
Source§impl<'a, T: 'static> WasmStoreContextMut<'a, T, Engine> for StoreContextMut<'a, T>
impl<'a, T: 'static> 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