pub trait Match<A: AstTypes> {
// Required methods
fn apply(&mut self, sub: &Subst<A>);
fn recurse(sub: &mut Subst<A>, pat: &Self, expr: &Self) -> bool;
// Provided methods
fn apply_rule(&mut self, pat: &Self, template: &Self) -> bool
where Self: Sized + Clone { ... }
fn match_with(&self, pat: &Self) -> Option<Subst<A>> { ... }
}Required Methods§
Provided Methods§
Sourcefn apply_rule(&mut self, pat: &Self, template: &Self) -> bool
fn apply_rule(&mut self, pat: &Self, template: &Self) -> bool
Applies a substitution rule from pat to template on self
Sourcefn match_with(&self, pat: &Self) -> Option<Subst<A>>
fn match_with(&self, pat: &Self) -> Option<Subst<A>>
Matches self against the provided pattern
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".