pub struct PluginRegistry { /* private fields */ }Expand description
Registry for AEAD plugins with enhanced dependency management
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn register_plugin(&mut self, plugin: Box<dyn AeadPlugin>) -> Result<()>
pub fn register_plugin(&mut self, plugin: Box<dyn AeadPlugin>) -> Result<()>
Register a plugin with dependency checking
Sourcepub fn get_plugin_info(&self, name: &str) -> Option<PluginInfo>
pub fn get_plugin_info(&self, name: &str) -> Option<PluginInfo>
Get plugin information by name
Sourcepub fn list_plugins(&self) -> Vec<PluginInfo>
pub fn list_plugins(&self) -> Vec<PluginInfo>
List all registered plugins with their versions
Sourcepub fn is_plugin_compatible(&self, name: &str, required_version: &str) -> bool
pub fn is_plugin_compatible(&self, name: &str, required_version: &str) -> bool
Check if a plugin version is compatible
Sourcepub fn get_plugin(&self, algorithm: Algorithm) -> Option<&dyn AeadPlugin>
pub fn get_plugin(&self, algorithm: Algorithm) -> Option<&dyn AeadPlugin>
Get a plugin by algorithm
Sourcepub fn create_aead(
&self,
algorithm: Algorithm,
) -> Result<Box<dyn AeadWithMetadata>>
pub fn create_aead( &self, algorithm: Algorithm, ) -> Result<Box<dyn AeadWithMetadata>>
Create an AEAD instance using a plugin
Sourcepub fn available_algorithms(&self) -> Vec<Algorithm>
pub fn available_algorithms(&self) -> Vec<Algorithm>
Get all registered algorithms
Sourcepub fn plugins(&self) -> &[Box<dyn AeadPlugin>]
pub fn plugins(&self) -> &[Box<dyn AeadPlugin>]
Get all plugins
Sourcepub fn is_available(&self, algorithm: Algorithm) -> bool
pub fn is_available(&self, algorithm: Algorithm) -> bool
Check if an algorithm is available
Sourcepub fn get_metadata(
&self,
algorithm: Algorithm,
) -> Option<&'static AeadMetadata>
pub fn get_metadata( &self, algorithm: Algorithm, ) -> Option<&'static AeadMetadata>
Get plugin metadata for an algorithm
Sourcepub fn get_all_metadata(&self) -> Vec<&'static AeadMetadata>
pub fn get_all_metadata(&self) -> Vec<&'static AeadMetadata>
Get all plugin metadata
Sourcepub fn remove_plugin(&mut self, algorithm: Algorithm) -> Result<()>
pub fn remove_plugin(&mut self, algorithm: Algorithm) -> Result<()>
Remove a plugin
Sourcepub fn plugin_count(&self) -> usize
pub fn plugin_count(&self) -> usize
Get plugin count
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 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