pub struct PluginRegistry { /* private fields */ }Expand description
Registry managing all installed plugins.
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new(engine_version: PluginVersion) -> Self
Sourcepub fn install(
&mut self,
descriptor: PluginDescriptor,
module: Option<Arc<dyn NativeModule>>,
) -> PluginResult<()>
pub fn install( &mut self, descriptor: PluginDescriptor, module: Option<Arc<dyn NativeModule>>, ) -> PluginResult<()>
Install a plugin. Validates compatibility and registers its native module.
Sourcepub fn uninstall(&mut self, name: &str) -> PluginResult<()>
pub fn uninstall(&mut self, name: &str) -> PluginResult<()>
Uninstall a plugin by name.
Sourcepub fn set_enabled(&mut self, name: &str, enabled: bool) -> PluginResult<()>
pub fn set_enabled(&mut self, name: &str, enabled: bool) -> PluginResult<()>
Enable or disable a plugin.
Sourcepub fn get_descriptor(&self, name: &str) -> Option<&PluginDescriptor>
pub fn get_descriptor(&self, name: &str) -> Option<&PluginDescriptor>
Get a plugin descriptor by name.
Sourcepub fn is_installed(&self, name: &str) -> bool
pub fn is_installed(&self, name: &str) -> bool
Check if a plugin is installed.
Sourcepub fn installed_names(&self) -> Vec<String>
pub fn installed_names(&self) -> Vec<String>
List all installed plugin names.
Sourcepub fn enabled_plugins(&self) -> Vec<&PluginDescriptor>
pub fn enabled_plugins(&self) -> Vec<&PluginDescriptor>
List enabled plugins.
Sourcepub fn module_registry(&self) -> &ModuleRegistry
pub fn module_registry(&self) -> &ModuleRegistry
Get the underlying module registry (for bridge calls).
Sourcepub fn search(&self, query: &str) -> Vec<&PluginDescriptor>
pub fn search(&self, query: &str) -> Vec<&PluginDescriptor>
Search plugins by keyword (matches name, description, keywords).
Sourcepub fn by_category(&self, category: &PluginCategory) -> Vec<&PluginDescriptor>
pub fn by_category(&self, category: &PluginCategory) -> Vec<&PluginDescriptor>
Filter plugins by category.
Sourcepub fn by_platform(&self, target: &BuildTarget) -> Vec<&PluginDescriptor>
pub fn by_platform(&self, target: &BuildTarget) -> Vec<&PluginDescriptor>
Filter plugins by platform support.
Sourcepub fn by_capability(&self, cap: &PluginCapability) -> Vec<&PluginDescriptor>
pub fn by_capability(&self, cap: &PluginCapability) -> Vec<&PluginDescriptor>
Filter plugins by capability.
Auto Trait Implementations§
impl !Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin 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