pub struct PluginRegistry { /* private fields */ }Expand description
Central plugin registry for managing all optimizer 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 register_plugin<F>(&self, factory: F) -> Result<()>where
F: PluginFactoryWrapper + 'static,
pub fn register_plugin<F>(&self, factory: F) -> Result<()>where
F: PluginFactoryWrapper + 'static,
Register a plugin factory
Sourcepub fn unregister_plugin(&self, name: &str) -> Result<()>
pub fn unregister_plugin(&self, name: &str) -> Result<()>
Unregister a plugin
Sourcepub fn create_optimizer<A>(
&self,
name: &str,
config: OptimizerConfig,
) -> Result<Box<dyn OptimizerPlugin<A>>>
pub fn create_optimizer<A>( &self, name: &str, config: OptimizerConfig, ) -> Result<Box<dyn OptimizerPlugin<A>>>
Create optimizer instance from plugin
Sourcepub fn list_plugins(&self) -> Vec<PluginInfo>
pub fn list_plugins(&self) -> Vec<PluginInfo>
List all registered plugins
Sourcepub fn search_plugins(&self, query: PluginQuery) -> PluginSearchResult
pub fn search_plugins(&self, query: PluginQuery) -> PluginSearchResult
Search for plugins matching criteria
Sourcepub fn get_plugin_info(&self, name: &str) -> Option<PluginInfo>
pub fn get_plugin_info(&self, name: &str) -> Option<PluginInfo>
Get plugin information
Sourcepub fn get_plugin_status(&self, name: &str) -> Option<PluginStatus>
pub fn get_plugin_status(&self, name: &str) -> Option<PluginStatus>
Get plugin status
Sourcepub fn set_plugin_status(&self, name: &str, status: PluginStatus) -> Result<()>
pub fn set_plugin_status(&self, name: &str, status: PluginStatus) -> Result<()>
Enable/disable plugin
Sourcepub fn add_search_path<P: AsRef<Path>>(&self, path: P)
pub fn add_search_path<P: AsRef<Path>>(&self, path: P)
Add plugin search path
Sourcepub fn discover_plugins(&self) -> Result<usize>
pub fn discover_plugins(&self) -> Result<usize>
Discover plugins in search paths
Sourcepub fn add_event_listener(&self, listener: Box<dyn RegistryEventListener>)
pub fn add_event_listener(&self, listener: Box<dyn RegistryEventListener>)
Add event listener
Sourcepub fn get_cache_stats(&self) -> CacheStats
pub fn get_cache_stats(&self) -> CacheStats
Get cache statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear plugin cache
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.