[][src]Struct egg::ConditionalApplier

pub struct ConditionalApplier<C, A> {
    pub condition: C,
    pub applier: A,
}

An Applier that checks a Condition before applying.

A ConditionalApplier simply calls check on the Condition before calling apply_one on the inner Applier.

See the rewrite! macro documentation for an example.

Fields

condition: C

The Condition to check before calling apply_one on applier.

applier: A

The inner Applier to call once condition passes.

Trait Implementations

impl<C, A, N, L> Applier<L, N> for ConditionalApplier<C, A> where
    L: Language,
    C: Condition<L, N>,
    A: Applier<L, N>,
    N: Analysis<L>, 
[src]

impl<C: Clone, A: Clone> Clone for ConditionalApplier<C, A>[src]

impl<C: Debug, A: Debug> Debug for ConditionalApplier<C, A>[src]

Auto Trait Implementations

impl<C, A> RefUnwindSafe for ConditionalApplier<C, A> where
    A: RefUnwindSafe,
    C: RefUnwindSafe

impl<C, A> Send for ConditionalApplier<C, A> where
    A: Send,
    C: Send

impl<C, A> Sync for ConditionalApplier<C, A> where
    A: Sync,
    C: Sync

impl<C, A> Unpin for ConditionalApplier<C, A> where
    A: Unpin,
    C: Unpin

impl<C, A> UnwindSafe for ConditionalApplier<C, A> where
    A: UnwindSafe,
    C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.