pub struct Store { /* private fields */ }
Expand description
Global state that can be manipulated by WebAssembly programs
Data should only be addressable by the module that owns it
Note that the state doesn’t do any garbage collection - so it will grow indefinitely if you keep adding modules to it. When calling temporary functions, you should create a new store and then drop it when you’re done (e.g. in a request handler)
See https://webassembly.github.io/spec/core/exec/runtime.html#store
Implementations§
source§impl Store
impl Store
sourcepub fn get_module_instance(
&self,
addr: ModuleInstanceAddr
) -> Option<&ModuleInstance>
pub fn get_module_instance( &self, addr: ModuleInstanceAddr ) -> Option<&ModuleInstance>
Get a module instance by the internal id
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Store
impl !Send for Store
impl !Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
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