pub struct Store { /* private fields */ }
Expand description
The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.
Implementations§
Source§impl Store
impl Store
Sourcepub fn create() -> WasmEdgeResult<Self>
pub fn create() -> WasmEdgeResult<Self>
Sourcepub fn module_len(&self) -> u32
pub fn module_len(&self) -> u32
Returns the length of the registered modules.
Sourcepub fn module(
&self,
name: impl AsRef<str>,
) -> WasmEdgeResult<InnerRef<Instance, &Self>>
pub fn module( &self, name: impl AsRef<str>, ) -> WasmEdgeResult<InnerRef<Instance, &Self>>
Returns the module instance by the module name.
§Argument
name
- The name of the module instance to get.
§Error
If fail to find the target module instance, then an error is returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
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