pub struct RuleEngine {
    pub knowledge: HashMap<String, String>,
    pub rules: Vec<Rule>,
}
Expand description

Defines an engine used to evaluate and execute rules.

Fields

knowledge: HashMap<String, String>rules: Vec<Rule>

Implementations

creates a new instance of RuleEngine

orders rules by their priority, evaluates their conditions, and if true, executes the action.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.