pub trait EngineListener: Send + Sync {
// Provided methods
fn begin_cycle(&self, _cycle: u64) { ... }
fn evaluate_rule(&self, _cycle: u64, _rule: &Rule, _matched: bool) { ... }
fn execute_rule(&self, _cycle: u64, _rule: &Rule) { ... }
}Expand description
Receives notifications as the engine runs, like Grule’s GruleEngineListener.
All methods do nothing by default.
Provided Methods§
Sourcefn begin_cycle(&self, _cycle: u64)
fn begin_cycle(&self, _cycle: u64)
A new cycle is starting (cycles are numbered from 1).
Sourcefn evaluate_rule(&self, _cycle: u64, _rule: &Rule, _matched: bool)
fn evaluate_rule(&self, _cycle: u64, _rule: &Rule, _matched: bool)
A rule’s condition was evaluated; matched is whether it held.
Sourcefn execute_rule(&self, _cycle: u64, _rule: &Rule)
fn execute_rule(&self, _cycle: u64, _rule: &Rule)
A rule was chosen and its actions are about to run.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".