pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing loaded plugins.
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn new(config: RegistryConfig) -> Self
pub fn new(config: RegistryConfig) -> Self
Create a new plugin registry.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default configuration.
Sourcepub fn config(&self) -> &RegistryConfig
pub fn config(&self) -> &RegistryConfig
Get the registry configuration.
Sourcepub fn register(&self, plugin: PluginHandle) -> Result<()>
pub fn register(&self, plugin: PluginHandle) -> Result<()>
Register a plugin.
Sourcepub fn unregister(&self, name: &str) -> Result<PluginHandle>
pub fn unregister(&self, name: &str) -> Result<PluginHandle>
Unregister a plugin by name.
Sourcepub fn get(&self, name: &str) -> Option<PluginHandle>
pub fn get(&self, name: &str) -> Option<PluginHandle>
Get a plugin by name.
Sourcepub fn all(&self) -> Vec<PluginHandle>
pub fn all(&self) -> Vec<PluginHandle>
Get all plugins.
Sourcepub fn by_state(&self, state: LifecycleState) -> Vec<PluginHandle>
pub fn by_state(&self, state: LifecycleState) -> Vec<PluginHandle>
Get plugins by state.
Sourcepub fn running(&self) -> Vec<PluginHandle>
pub fn running(&self) -> Vec<PluginHandle>
Get running plugins.
Sourcepub fn info(&self) -> Vec<PluginInfo>
pub fn info(&self) -> Vec<PluginInfo>
Get all plugin info.
Sourcepub fn unload_all(&self)
pub fn unload_all(&self)
Unload all plugins.
Sourcepub fn find_by_tag(&self, tag: &str) -> Vec<PluginHandle>
pub fn find_by_tag(&self, tag: &str) -> Vec<PluginHandle>
Find plugins by tag.
Sourcepub fn find_by_capability(&self, cap: &str) -> Vec<PluginHandle>
pub fn find_by_capability(&self, cap: &str) -> Vec<PluginHandle>
Find plugins by capability.
Trait Implementations§
Source§impl Debug for PluginRegistry
impl Debug for PluginRegistry
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl !UnwindSafe for PluginRegistry
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