pub struct ExprGroup { /* private fields */ }Expand description
Logical grouping of Expression instances.
Associates a list Condition instances that guard
rewrites defined by Rule.
Implementations§
Source§impl ExprGroup
impl ExprGroup
Sourcepub fn new(expressions: Vec<Expression>) -> Self
pub fn new(expressions: Vec<Expression>) -> Self
Build a new ExprGroup instance from the specified
list of Expression instances.
This should contains all rules related to one another
with Condition instances leading into Rule instances after.
Sourcepub fn max_iterations(self, iterations: usize) -> Self
pub fn max_iterations(self, iterations: usize) -> Self
Configure max number of loops over entire ruleset during rewrite before error
Default is 10
Sourcepub fn match_conditions(&self, ctx: &mut EngineCtx<'_>) -> bool
pub fn match_conditions(&self, ctx: &mut EngineCtx<'_>) -> bool
Check all relevant Condition expressions are met.
This method guards ExprGroup::rewrite.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExprGroup
impl RefUnwindSafe for ExprGroup
impl Send for ExprGroup
impl Sync for ExprGroup
impl Unpin for ExprGroup
impl UnwindSafe for ExprGroup
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