Trait RuleProvider

Source
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<()> { ... }
}
Expand description

Trait for rule providers to register rules with the engine

Required Methods§

Source

fn provider_id(&self) -> &'static str

Unique identifier for this rule provider

Source

fn description(&self) -> &'static str

Human-readable description of this rule provider

Source

fn version(&self) -> &'static str

Version of this rule provider

Source

fn register_rules(&self, registry: &mut RuleRegistry)

Register all rules from this provider with the registry

Provided Methods§

Source

fn config_schema(&self) -> Option<Value>

Provider-specific configuration schema

Source

fn rule_ids(&self) -> Vec<&'static str>

List of rule IDs that this provider registers

Source

fn initialize(&self) -> Result<()>

Provider initialization hook

Implementors§