pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn unregister_plugin(&mut self, name: &str) -> Result<()>
pub fn unregister_plugin(&mut self, name: &str) -> Result<()>
Unregister a plugin
Sourcepub fn get_plugin(&self, name: &str) -> Option<&dyn Plugin>
pub fn get_plugin(&self, name: &str) -> Option<&dyn Plugin>
Get a plugin by name
Sourcepub fn get_plugin_mut(&mut self, name: &str) -> Option<&mut (dyn Plugin + '_)>
pub fn get_plugin_mut(&mut self, name: &str) -> Option<&mut (dyn Plugin + '_)>
Get a mutable plugin by name
Sourcepub fn list_plugins(&self) -> Vec<String>
pub fn list_plugins(&self) -> Vec<String>
List all registered plugins
Sourcepub fn execute_hook(&mut self, hook: PluginHook) -> Result<()>
pub fn execute_hook(&mut self, hook: PluginHook) -> Result<()>
Execute a hook for all registered plugins
Sourcepub fn set_plugin_config(
&mut self,
plugin_name: &str,
config: Value,
) -> Result<()>
pub fn set_plugin_config( &mut self, plugin_name: &str, config: Value, ) -> Result<()>
Set plugin configuration
Sourcepub fn get_plugin_config(&self, plugin_name: &str) -> Option<&Value>
pub fn get_plugin_config(&self, plugin_name: &str) -> Option<&Value>
Get plugin configuration
Sourcepub fn set_plugin_data(&mut self, key: String, value: Value)
pub fn set_plugin_data(&mut self, key: String, value: Value)
Set plugin data
Sourcepub fn get_plugin_data(&self, key: &str) -> Option<&Value>
pub fn get_plugin_data(&self, key: &str) -> Option<&Value>
Get plugin data
Sourcepub fn update_generator(&mut self, generator: CssGenerator)
pub fn update_generator(&mut self, generator: CssGenerator)
Update the CSS generator
Sourcepub fn get_generator(&self) -> Arc<CssGenerator>
pub fn get_generator(&self) -> Arc<CssGenerator>
Get the current CSS generator
Trait Implementations§
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