pub struct RuleEngine { /* private fields */ }Expand description
Main rules engine
Implementations§
Source§impl RuleEngine
impl RuleEngine
Sourcepub async fn execute_rule(
&self,
rule: &Rule,
context: &mut ExecutionContext,
) -> Result<RuleResult>
pub async fn execute_rule( &self, rule: &Rule, context: &mut ExecutionContext, ) -> Result<RuleResult>
Execute a rule
Sourcepub async fn evaluate_condition(
&self,
condition: &RuleCondition,
context: &ExecutionContext,
) -> Result<bool>
pub async fn evaluate_condition( &self, condition: &RuleCondition, context: &ExecutionContext, ) -> Result<bool>
Evaluate a condition
Sourcepub async fn execute_action(
&self,
action: &RuleAction,
context: &mut ExecutionContext,
) -> Result<()>
pub async fn execute_action( &self, action: &RuleAction, context: &mut ExecutionContext, ) -> Result<()>
Execute an action
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleEngine
impl !RefUnwindSafe for RuleEngine
impl Send for RuleEngine
impl Sync for RuleEngine
impl Unpin for RuleEngine
impl !UnwindSafe for RuleEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more