pub struct PluginRegistry { /* private fields */ }Expand description
Thread-safe registry for managing plugins.
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn register_generator(
&self,
plugin: Box<dyn GeneratorPlugin>,
) -> Result<(), SynthError>
pub fn register_generator( &self, plugin: Box<dyn GeneratorPlugin>, ) -> Result<(), SynthError>
Register a generator plugin.
Returns an error if a generator with the same name is already registered.
Sourcepub fn register_sink(
&self,
plugin: Box<dyn SinkPlugin>,
) -> Result<(), SynthError>
pub fn register_sink( &self, plugin: Box<dyn SinkPlugin>, ) -> Result<(), SynthError>
Register a sink plugin.
Returns an error if a sink with the same name is already registered.
Sourcepub fn register_transform(
&self,
plugin: Box<dyn TransformPlugin>,
) -> Result<(), SynthError>
pub fn register_transform( &self, plugin: Box<dyn TransformPlugin>, ) -> Result<(), SynthError>
Register a transform plugin.
Returns an error if a transform with the same name is already registered.
Sourcepub fn get_generator(&self, name: &str) -> Option<Arc<dyn GeneratorPlugin>>
pub fn get_generator(&self, name: &str) -> Option<Arc<dyn GeneratorPlugin>>
Get a generator plugin by name.
Sourcepub fn get_transform(&self, name: &str) -> Option<Arc<dyn TransformPlugin>>
pub fn get_transform(&self, name: &str) -> Option<Arc<dyn TransformPlugin>>
Get a transform plugin by name.
Sourcepub fn list_plugins(&self) -> Vec<PluginInfo>
pub fn list_plugins(&self) -> Vec<PluginInfo>
List all registered plugins.
Sourcepub fn plugin_count(&self) -> usize
pub fn plugin_count(&self) -> usize
Get the count of registered plugins.
Trait Implementations§
Source§impl Clone for PluginRegistry
impl Clone for PluginRegistry
Source§fn clone(&self) -> PluginRegistry
fn clone(&self) -> PluginRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginRegistry
impl RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin 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