Struct wasmedge_sdk::plugin::Plugin
source · pub struct Plugin { /* private fields */ }
Expand description
Represents a loaded plugin. It provides the APIs for accessing the plugin.
Implementations§
source§impl Plugin
impl Plugin
sourcepub fn mod_names(&self) -> Vec<String>
pub fn mod_names(&self) -> Vec<String>
Returns the names of all module instances in this plugin.
sourcepub fn mod_instance(
&self,
name: impl AsRef<str>
) -> WasmEdgeResult<PluginInstance>
pub fn mod_instance( &self, name: impl AsRef<str> ) -> WasmEdgeResult<PluginInstance>
Returns a module instance that is generated from the module with the given name in this plugin.
Argument
name
- The name of the target module.
Error
If failed to return the plugin module instance, then return PluginError::Create error.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnwindSafe for Plugin
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