pub struct PluginsFactory { /* private fields */ }Expand description
Plugin Factory
A plugin factory stores all registered builders, and is used to create all plugin instances on request.
Implementations§
Source§impl PluginsFactory
 
impl PluginsFactory
Sourcepub fn new() -> PluginsFactory
 
pub fn new() -> PluginsFactory
Create a new empty plugin factory
Sourcepub fn add_builder(&mut self, b: Box<dyn PluginBuilder>)
 
pub fn add_builder(&mut self, b: Box<dyn PluginBuilder>)
Add a new plugin builder to the factory
Sourcepub fn build_plugins(
    &self,
    config: &Config,
) -> Result<PluginRegistry, PluginBuilderError>
 
pub fn build_plugins( &self, config: &Config, ) -> Result<PluginRegistry, PluginBuilderError>
Instantiate all plugins
Sourcepub fn build_filter_plugins<P>(
    &self,
    predicate: P,
    config: &Config,
) -> Result<PluginRegistry, PluginBuilderError>
 
pub fn build_filter_plugins<P>( &self, predicate: P, config: &Config, ) -> Result<PluginRegistry, PluginBuilderError>
Instantiate plugins if they match predicate
Sourcepub fn iter_builders<Op>(&self, op: Op)
 
pub fn iter_builders<Op>(&self, op: Op)
Iterate builder names
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginsFactory
impl !RefUnwindSafe for PluginsFactory
impl Send for PluginsFactory
impl Sync for PluginsFactory
impl Unpin for PluginsFactory
impl !UnwindSafe for PluginsFactory
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