pub struct Store { /* private fields */ }Expand description
The store represents all global state that can be manipulated by WebAssembly programs. It consists of the runtime representation of all instances of functions, tables, memories, and globals that have been allocated during the lifetime of the abstract machine.
The Store holds the engine (that is —amongst many things— used to compile
the Wasm bytes into a valid module artifact), in addition to the
Tunables
(that are used to create the memories, tables and globals).
Spec: https://webassembly.github.io/spec/core/exec/runtime.html#store
Implementations§
source§impl Store
impl Store
sourcepub fn new_with_engine(engine: impl Into<Engine>) -> Self
👎Deprecated since 3.0.0: Store::new_with_engine has been deprecated in favor of Store::new
pub fn new_with_engine(engine: impl Into<Engine>) -> Self
Creates a new Store with a specific Engine.
sourcepub fn set_trap_handler(&mut self, handler: Option<Box<TrapHandlerFn<'static>>>)
pub fn set_trap_handler(&mut self, handler: Option<Box<TrapHandlerFn<'static>>>)
Set the trap handler in this store.
Trait Implementations§
source§impl AsStoreMut for Store
impl AsStoreMut for Store
source§fn as_store_mut(&mut self) -> StoreMut<'_>
fn as_store_mut(&mut self) -> StoreMut<'_>
Returns a
StoreMut pointing to the underlying context.source§fn objects_mut(&mut self) -> &mut StoreObjects
fn objects_mut(&mut self) -> &mut StoreObjects
Returns the ObjectMutable
source§impl AsStoreRef for Store
impl AsStoreRef for Store
source§fn as_store_ref(&self) -> StoreRef<'_>
fn as_store_ref(&self) -> StoreRef<'_>
Returns a
StoreRef pointing to the underlying context.source§impl TrapHandler for Store
impl TrapHandler for Store
source§fn custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn<'_>) -> bool) -> bool
fn custom_trap_handler(&self, call: &dyn Fn(&TrapHandlerFn<'_>) -> bool) -> bool
Uses
call to call a custom signal handler, if one is specified. Read moreimpl Send for Store
impl Sync for Store
Auto Trait Implementations§
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer