pub struct Store {
pub(crate) inner: Box<StoreInner>,
}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 is tied to the underlying Engine that is — among many things — used to
compile the Wasm bytes into a valid module artifact.
For more informations, check out the [related WebAssembly specification] [related WebAssembly specification]: https://webassembly.github.io/spec/core/exec/runtime.html#store
Fields§
§inner: Box<StoreInner>Implementations§
Source§impl Store
impl Store
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 TrapHandlerFn for this store.
§Note
Not every implementor allows changing the trap handler. In those store that don’t allow it, this function has no effect.
Sourcepub fn engine_mut(&mut self) -> &mut Engine
pub fn engine_mut(&mut self) -> &mut Engine
Returns mutable reference to Engine.
Source§impl Store
impl Store
Sourcepub(crate) fn into_sys(self) -> Store
pub(crate) fn into_sys(self) -> Store
Consume self into crate::backend::sys::store::Store.
Sourcepub(crate) fn as_sys(&self) -> &Store
pub(crate) fn as_sys(&self) -> &Store
Convert a reference to self into a reference crate::backend::sys::store::Store.
Sourcepub(crate) fn as_sys_mut(&mut self) -> &mut Store
pub(crate) fn as_sys_mut(&mut self) -> &mut Store
Convert a mutable reference to self into a mutable reference crate::backend::sys::store::Store.
Trait Implementations§
Source§impl AsEngineRef for Store
impl AsEngineRef for Store
Source§impl AsStoreMut for Store
impl AsStoreMut for Store
Source§fn as_store_mut(&mut self) -> StoreMut<'_>
fn as_store_mut(&mut self) -> StoreMut<'_>
StoreMut pointing to the underlying context.Source§fn objects_mut(&mut self) -> &mut StoreObjects
fn objects_mut(&mut self) -> &mut StoreObjects
Source§impl AsStoreRef for Store
impl AsStoreRef for Store
Source§fn as_store_ref(&self) -> StoreRef<'_>
fn as_store_ref(&self) -> StoreRef<'_>
StoreRef pointing to the underlying context.Source§impl NativeStoreExt for Store
impl NativeStoreExt for Store
Source§fn signal_handler(&self) -> Option<*const TrapHandlerFn<'static>>
fn signal_handler(&self) -> Option<*const TrapHandlerFn<'static>>
The signal handler
Source§fn set_trap_handler(&mut self, handler: Option<Box<TrapHandlerFn<'static>>>)
fn set_trap_handler(&mut self, handler: Option<Box<TrapHandlerFn<'static>>>)
impl Send for Store
impl Sync for Store
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl Unpin for Store
impl !UnwindSafe for Store
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more