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>>>)
source§impl PartialEq for Store
impl PartialEq for Store
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