Skip to main content

Matcher

Trait Matcher 

Source
pub trait Matcher<C> {
    // Required method
    fn rewrite(&self, uop: &Arc<UOp>, ctx: &mut C) -> RewriteResult;
}
Expand description

Trait for pattern matchers used by the rewrite engine.

This trait provides a unified interface for pattern matching, allowing the rewrite engine to work with different matcher implementations.

Required Methods§

Source

fn rewrite(&self, uop: &Arc<UOp>, ctx: &mut C) -> RewriteResult

Attempt to rewrite a UOp using registered patterns.

Implementations on Foreign Types§

Source§

impl<C, M> Matcher<C> for &M
where M: Matcher<C> + ?Sized,

Source§

fn rewrite(&self, uop: &Arc<UOp>, ctx: &mut C) -> RewriteResult

Implementors§