Skip to main content

CommandSpec

Trait CommandSpec 

Source
pub trait CommandSpec: Send + Sync {
    // Required method
    fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch;
}
Expand description

Trait for command evaluation specs.

Each implementation knows how to evaluate a specific command (or family of commands) and returns a RuleMatch with the decision and reason.

Required Methods§

Source

fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch

Evaluate the command in the given context and return a decision.

Implementors§