[][src]Enum egg::expr::Expr

pub enum Expr<L: Language, Child> {
    Constant(L::Constant),
    Variable(L::Variable),
    Operator(L::OperatorVec<Child>),
}

Variants

Constant(L::Constant)Variable(L::Variable)Operator(L::OperatorVec<Child>)

Methods

impl<L: Language, Child> Expr<L, Child>[src]

pub fn map_children_result<Child2, F, Error>(
    &self,
    f: F
) -> Result<Expr<L, Child2>, Error> where
    Child: Clone,
    F: FnMut(Child) -> Result<Child2, Error>, 
[src]

pub fn map_children<Child2, F>(&self, f: F) -> Expr<L, Child2> where
    Child: Clone,
    F: FnMut(Child) -> Child2, 
[src]

pub fn children(&self) -> &[Child][src]

pub fn symbol(&self) -> Symbol<L, Child>[src]

impl<L: Language> Expr<L, Id>[src]

pub fn update_ids<V>(&self, unionfind: &UnionFind<Id, V>) -> Self[src]

Trait Implementations

impl<L: Clone + Language, Child: Clone> Clone for Expr<L, Child> where
    L::Constant: Clone,
    L::Variable: Clone,
    L::Operator: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<L: Language> From<Expr<L, RecExpr<L>>> for RecExpr<L>[src]

impl<L: Language> AsRef<Expr<L, RecExpr<L>>> for RecExpr<L>[src]

impl<L: Eq + Language, Child: Eq> Eq for Expr<L, Child> where
    L::Constant: Eq,
    L::Variable: Eq,
    L::Operator: Eq
[src]

impl<L: PartialEq + Language, Child: PartialEq> PartialEq<Expr<L, Child>> for Expr<L, Child> where
    L::Constant: PartialEq,
    L::Variable: PartialEq,
    L::Operator: PartialEq
[src]

impl<L: Hash + Language, Child: Hash> Hash for Expr<L, Child> where
    L::Constant: Hash,
    L::Variable: Hash,
    L::Operator: Hash
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<L: Debug + Language, Child: Debug> Debug for Expr<L, Child> where
    L::Constant: Debug,
    L::Variable: Debug,
    L::Operator: Debug
[src]

impl<L: Language> Borrow<Expr<L, RecExpr<L>>> for RecExpr<L>[src]

Auto Trait Implementations

impl<L, Child> Unpin for Expr<L, Child> where
    Child: Unpin,
    <L as Language>::Constant: Unpin,
    <L as Language>::Operator: Unpin,
    <L as Language>::Variable: Unpin

impl<L, Child> Sync for Expr<L, Child> where
    Child: Sync,
    <L as Language>::Constant: Sync,
    <L as Language>::Operator: Sync,
    <L as Language>::Variable: Sync

impl<L, Child> Send for Expr<L, Child> where
    Child: Send,
    <L as Language>::Constant: Send,
    <L as Language>::Operator: Send,
    <L as Language>::Variable: Send

impl<L, Child> UnwindSafe for Expr<L, Child> where
    Child: UnwindSafe,
    <L as Language>::Constant: UnwindSafe,
    <L as Language>::Operator: UnwindSafe,
    <L as Language>::Variable: UnwindSafe

impl<L, Child> RefUnwindSafe for Expr<L, Child> where
    Child: RefUnwindSafe,
    <L as Language>::Constant: RefUnwindSafe,
    <L as Language>::Operator: RefUnwindSafe,
    <L as Language>::Variable: RefUnwindSafe

Blanket Implementations

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> From<T> for T[src]

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.

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]