pub struct Store<T: 'static> { /* private fields */ }Expand description
Owns all the data for the wasm module
Can be cheaply cloned
The data is retained through the lifetime of the store, and no GC will collect data from no-longer used modules. It is as such recommended to have the stores lifetime correspond to its modules, and not repeatedly create and drop modules within an existing store, but rather create a new store for it, to avoid unbounded memory use.
Trait Implementations§
Source§impl<T: 'static> AsContext<Engine> for Store<T>
impl<T: 'static> AsContext<Engine> for Store<T>
Source§fn as_context(
&self,
) -> <Engine as WasmEngine>::StoreContext<'_, Self::UserState>
fn as_context( &self, ) -> <Engine as WasmEngine>::StoreContext<'_, Self::UserState>
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.
Auto Trait Implementations§
impl<T> Freeze for Store<T>
impl<T> !RefUnwindSafe for Store<T>
impl<T> !Send for Store<T>
impl<T> !Sync for Store<T>
impl<T> Unpin for Store<T>
impl<T> !UnwindSafe for Store<T>
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