pub trait RuleOverload {
// Required methods
fn matches(&self, lhs: &AnyExpr, rhs: &AnyExpr) -> bool;
fn unroll(
&self,
lhs: AnyExpr,
rhs: AnyExpr,
context: &mut CompileContext,
props: Properties,
inverted: bool,
weight: ProcNum,
) -> Box<dyn Node>;
}
Expand description
Trait for rule overloads
Required Methods§
Sourcefn matches(&self, lhs: &AnyExpr, rhs: &AnyExpr) -> bool
fn matches(&self, lhs: &AnyExpr, rhs: &AnyExpr) -> bool
Check if this overload can be called with the given expressions.
Sourcefn unroll(
&self,
lhs: AnyExpr,
rhs: AnyExpr,
context: &mut CompileContext,
props: Properties,
inverted: bool,
weight: ProcNum,
) -> Box<dyn Node>
fn unroll( &self, lhs: AnyExpr, rhs: AnyExpr, context: &mut CompileContext, props: Properties, inverted: bool, weight: ProcNum, ) -> Box<dyn Node>
Unroll this rule.