Skip to main content

RuleEngine

Trait RuleEngine 

Source
pub trait RuleEngine {
    // Required methods
    fn matches_group(&self, group: &EntryGroup) -> Vec<MatchResult>;
    fn commands(&self) -> &[CommandConfig];
    fn command_count(&self) -> usize;
}
Expand description

Engine that matches discovered entry groups against the loaded rules. The default implementation is Matcher; an alternative engine can be swapped in behind this trait without touching the discovery or UI layers.

Required Methods§

Source

fn matches_group(&self, group: &EntryGroup) -> Vec<MatchResult>

Rules that match at least one entry in group.

Source

fn commands(&self) -> &[CommandConfig]

All loaded rules, in load order.

Source

fn command_count(&self) -> usize

Number of loaded rules.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§