pub struct PluginRegistry { /* private fields */ }Expand description
Registry for managing rule providers and creating engines
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn register_provider(
&mut self,
provider: Box<dyn RuleProvider>,
) -> Result<()>
pub fn register_provider( &mut self, provider: Box<dyn RuleProvider>, ) -> Result<()>
Register a rule provider
Sourcepub fn providers(&self) -> &[Box<dyn RuleProvider>]
pub fn providers(&self) -> &[Box<dyn RuleProvider>]
Get all registered providers
Sourcepub fn get_provider(&self, id: &str) -> Option<&dyn RuleProvider>
pub fn get_provider(&self, id: &str) -> Option<&dyn RuleProvider>
Get a provider by ID
Sourcepub fn create_rule_registry(&self) -> Result<RuleRegistry>
pub fn create_rule_registry(&self) -> Result<RuleRegistry>
Create a rule registry with all registered providers
Sourcepub fn create_rule_registry_with_config(
&self,
config: Option<&Config>,
) -> Result<RuleRegistry>
pub fn create_rule_registry_with_config( &self, config: Option<&Config>, ) -> Result<RuleRegistry>
Create a rule registry with all registered providers, using configuration
Sourcepub fn create_engine(&self) -> Result<LintEngine>
pub fn create_engine(&self) -> Result<LintEngine>
Create a lint engine with all registered providers
Sourcepub fn create_engine_with_config(
&self,
config: Option<&Config>,
) -> Result<LintEngine>
pub fn create_engine_with_config( &self, config: Option<&Config>, ) -> Result<LintEngine>
Create a lint engine with all registered providers, using configuration
Sourcepub fn available_rule_ids(&self) -> Vec<String>
pub fn available_rule_ids(&self) -> Vec<String>
List all available rule IDs from all providers
Sourcepub fn provider_info(&self) -> Vec<ProviderInfo>
pub fn provider_info(&self) -> Vec<ProviderInfo>
Get provider information for debugging/introspection
Trait Implementations§
Source§impl Default for PluginRegistry
impl Default for PluginRegistry
Source§fn default() -> PluginRegistry
fn default() -> PluginRegistry
Returns the “default value” for a type. Read more
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