Struct egg::ConditionalApplier
source · pub struct ConditionalApplier<C, A> {
pub condition: C,
pub applier: A,
}
Expand description
Fields§
§condition: C
§applier: A
The inner Applier
to call once condition
passes.
Trait Implementations§
source§impl<C, A, N, L> Applier<L, N> for ConditionalApplier<C, A>
impl<C, A, N, L> Applier<L, N> for ConditionalApplier<C, A>
source§fn get_pattern_ast(&self) -> Option<&PatternAst<L>>
fn get_pattern_ast(&self) -> Option<&PatternAst<L>>
For patterns, get the ast directly as a reference.
source§fn apply_one(
&self,
egraph: &mut EGraph<L, N>,
eclass: Id,
subst: &Subst,
searcher_ast: Option<&PatternAst<L>>,
rule_name: Symbol
) -> Vec<Id>
fn apply_one( &self, egraph: &mut EGraph<L, N>, eclass: Id, subst: &Subst, searcher_ast: Option<&PatternAst<L>>, rule_name: Symbol ) -> Vec<Id>
Apply a single substitution. Read more
source§fn vars(&self) -> Vec<Var>
fn vars(&self) -> Vec<Var>
Returns a list of variables that this Applier assumes are bound. Read more
source§fn apply_matches(
&self,
egraph: &mut EGraph<L, N>,
matches: &[SearchMatches<'_, L>],
rule_name: Symbol
) -> Vec<Id>
fn apply_matches( &self, egraph: &mut EGraph<L, N>, matches: &[SearchMatches<'_, L>], rule_name: Symbol ) -> Vec<Id>
Apply many substitutions. Read more
source§impl<C: Clone, A: Clone> Clone for ConditionalApplier<C, A>
impl<C: Clone, A: Clone> Clone for ConditionalApplier<C, A>
source§fn clone(&self) -> ConditionalApplier<C, A>
fn clone(&self) -> ConditionalApplier<C, A>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: PartialEq, A: PartialEq> PartialEq for ConditionalApplier<C, A>
impl<C: PartialEq, A: PartialEq> PartialEq for ConditionalApplier<C, A>
source§fn eq(&self, other: &ConditionalApplier<C, A>) -> bool
fn eq(&self, other: &ConditionalApplier<C, A>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<C: Eq, A: Eq> Eq for ConditionalApplier<C, A>
impl<C, A> StructuralPartialEq for ConditionalApplier<C, A>
Auto Trait Implementations§
impl<C, A> Freeze for ConditionalApplier<C, A>
impl<C, A> RefUnwindSafe for ConditionalApplier<C, A>where
C: RefUnwindSafe,
A: RefUnwindSafe,
impl<C, A> Send for ConditionalApplier<C, A>
impl<C, A> Sync for ConditionalApplier<C, A>
impl<C, A> Unpin for ConditionalApplier<C, A>
impl<C, A> UnwindSafe for ConditionalApplier<C, A>where
C: UnwindSafe,
A: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.