Struct wasmedge_sys::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<Instance>
pub fn mod_instance(&self, name: impl AsRef<str>) -> WasmEdgeResult<Instance>
Returns a plugin 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.
sourcepub fn as_ptr(&self) -> *const WasmEdge_PluginContext
Available on crate feature ffi
only.
pub fn as_ptr(&self) -> *const WasmEdge_PluginContext
ffi
only.Provides a raw pointer to the inner Plugin context.
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