pub trait RuleProvider: Send + Sync {
// Required methods
fn provider_id(&self) -> &'static str;
fn description(&self) -> &'static str;
fn version(&self) -> &'static str;
fn register_rules(&self, registry: &mut RuleRegistry);
// Provided methods
fn config_schema(&self) -> Option<Value> { ... }
fn rule_ids(&self) -> Vec<&'static str> { ... }
fn initialize(&self) -> Result<()> { ... }
fn register_rules_with_config(
&self,
registry: &mut RuleRegistry,
_config: Option<&Config>,
) { ... }
}Expand description
Trait for rule providers to register rules with the engine
Required Methods§
Sourcefn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Unique identifier for this rule provider
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of this rule provider
Sourcefn register_rules(&self, registry: &mut RuleRegistry)
fn register_rules(&self, registry: &mut RuleRegistry)
Register all rules from this provider with the registry
Provided Methods§
Sourcefn config_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
Provider-specific configuration schema
Sourcefn initialize(&self) -> Result<()>
fn initialize(&self) -> Result<()>
Provider initialization hook
Sourcefn register_rules_with_config(
&self,
registry: &mut RuleRegistry,
_config: Option<&Config>,
)
fn register_rules_with_config( &self, registry: &mut RuleRegistry, _config: Option<&Config>, )
Register all rules from this provider with the registry, using configuration This method allows rules to be configured at registration time. The default implementation calls the legacy register_rules method for backward compatibility.