PluginRegistry

Struct PluginRegistry 

Source
pub struct PluginRegistry { /* private fields */ }
Expand description

Plugin registry for managing plugins

Implementations§

Source§

impl PluginRegistry

Source

pub fn new() -> Self

Create a new plugin registry

Source

pub fn register_plugin(&mut self, plugin: Box<dyn Plugin>) -> Result<()>

Register a plugin

Source

pub fn unregister_plugin(&mut self, name: &str) -> Result<()>

Unregister a plugin

Source

pub fn get_plugin(&self, name: &str) -> Option<&dyn Plugin>

Get a plugin by name

Source

pub fn get_plugin_mut(&mut self, name: &str) -> Option<&mut (dyn Plugin + '_)>

Get a mutable plugin by name

Source

pub fn list_plugins(&self) -> Vec<String>

List all registered plugins

Source

pub fn execute_hook(&mut self, hook: PluginHook) -> Result<()>

Execute a hook for all registered plugins

Source

pub fn set_plugin_config( &mut self, plugin_name: &str, config: Value, ) -> Result<()>

Set plugin configuration

Source

pub fn get_plugin_config(&self, plugin_name: &str) -> Option<&Value>

Get plugin configuration

Source

pub fn set_plugin_data(&mut self, key: String, value: Value)

Set plugin data

Source

pub fn get_plugin_data(&self, key: &str) -> Option<&Value>

Get plugin data

Source

pub fn update_generator(&mut self, generator: CssGenerator)

Update the CSS generator

Source

pub fn get_generator(&self) -> Arc<CssGenerator>

Get the current CSS generator

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.