pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing custom components
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new(config: PluginConfig) -> Self
Sourcepub fn register_plugin(
&self,
name: &str,
plugin: Box<dyn Plugin>,
factory: Box<dyn ComponentFactory>,
) -> SklResult<()>
pub fn register_plugin( &self, name: &str, plugin: Box<dyn Plugin>, factory: Box<dyn ComponentFactory>, ) -> SklResult<()>
Register a plugin
Sourcepub fn unregister_plugin(&self, name: &str) -> SklResult<()>
pub fn unregister_plugin(&self, name: &str) -> SklResult<()>
Unregister a plugin
Sourcepub fn create_component(
&self,
plugin_name: &str,
component_type: &str,
config: &ComponentConfig,
) -> SklResult<Box<dyn PluginComponent>>
pub fn create_component( &self, plugin_name: &str, component_type: &str, config: &ComponentConfig, ) -> SklResult<Box<dyn PluginComponent>>
Create a component from a plugin
Sourcepub fn list_plugins(&self) -> SklResult<Vec<String>>
pub fn list_plugins(&self) -> SklResult<Vec<String>>
List all registered plugins
Sourcepub fn get_plugin_metadata(&self, name: &str) -> SklResult<PluginMetadata>
pub fn get_plugin_metadata(&self, name: &str) -> SklResult<PluginMetadata>
Get plugin metadata
Sourcepub fn list_component_types(&self, plugin_name: &str) -> SklResult<Vec<String>>
pub fn list_component_types(&self, plugin_name: &str) -> SklResult<Vec<String>>
List available component types for a plugin
Sourcepub fn get_component_schema(
&self,
plugin_name: &str,
component_type: &str,
) -> SklResult<Option<ComponentSchema>>
pub fn get_component_schema( &self, plugin_name: &str, component_type: &str, ) -> SklResult<Option<ComponentSchema>>
Get component schema
Sourcepub fn initialize_all(&self) -> SklResult<()>
pub fn initialize_all(&self) -> SklResult<()>
Initialize all plugins
Sourcepub fn shutdown_all(&self) -> SklResult<()>
pub fn shutdown_all(&self) -> SklResult<()>
Shutdown all plugins
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more