[][src]Struct egg::ENode

pub struct ENode<O, Child = Id> {
    pub op: O,
    pub children: SmallVec<[Child; 2]>,
}

Fields

op: Ochildren: SmallVec<[Child; 2]>

Methods

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

pub fn leaf(op: L) -> Self[src]

pub fn new(op: L, children: impl IntoIterator<Item = Child>) -> Self[src]

pub fn try_new<E, I>(op: L, children: I) -> Result<Self, E> where
    I: IntoIterator<Item = Result<Child, E>>, 
[src]

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

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

impl<L: Language> ENode<L>[src]

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

Trait Implementations

impl<L> AsRef<ENode<L, RecExpr<L>>> for RecExpr<L>[src]

impl<L> Borrow<ENode<L, RecExpr<L>>> for RecExpr<L>[src]

impl<O: Clone, Child: Clone> Clone for ENode<O, Child>[src]

impl<O: Debug, Child: Debug> Debug for ENode<O, Child>[src]

impl<O: Eq, Child: Eq> Eq for ENode<O, Child>[src]

impl<L> From<ENode<L, RecExpr<L>>> for RecExpr<L>[src]

impl<O: Hash, Child: Hash> Hash for ENode<O, Child>[src]

impl<O: PartialEq, Child: PartialEq> PartialEq<ENode<O, Child>> for ENode<O, Child>[src]

impl<O, Child> StructuralEq for ENode<O, Child>[src]

impl<O, Child> StructuralPartialEq for ENode<O, Child>[src]

Auto Trait Implementations

impl<O, Child> RefUnwindSafe for ENode<O, Child> where
    Child: RefUnwindSafe,
    O: RefUnwindSafe

impl<O, Child> Send for ENode<O, Child> where
    Child: Send,
    O: Send

impl<O, Child> Sync for ENode<O, Child> where
    Child: Sync,
    O: Sync

impl<O, Child> Unpin for ENode<O, Child> where
    Child: Unpin,
    O: Unpin

impl<O, Child> UnwindSafe for ENode<O, Child> where
    Child: RefUnwindSafe + UnwindSafe,
    O: 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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.