[][src]Struct egg::EClass

#[non_exhaustive]pub struct EClass<L, D> {
    pub id: Id,
    pub nodes: Vec<L>,
    pub data: D,
    // some fields omitted
}

An equivalence class of enodes.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
id: Id

This eclass's id.

nodes: Vec<L>

The equivalent enodes in this equivalence class.

data: D

The analysis data associated with this eclass.

Implementations

impl<L, D> EClass<L, D>[src]

pub fn is_empty(&self) -> bool[src]

Returns true if the eclass is empty.

pub fn len(&self) -> usize[src]

Returns the number of enodes in this eclass.

pub fn iter(&self) -> impl ExactSizeIterator<Item = &L>[src]

Iterates over the enodes in this eclass.

impl<L: Language, D> EClass<L, D>[src]

pub fn leaves(&self) -> impl Iterator<Item = &L>[src]

Iterates over the childless enodes in this eclass.

pub fn assert_unique_leaves(&self) where
    L: Language
[src]

Asserts that the childless enodes in this eclass are unique.

Trait Implementations

impl<L: Clone, D: Clone> Clone for EClass<L, D>[src]

impl<L: Debug, D: Debug> Debug for EClass<L, D>[src]

Auto Trait Implementations

impl<L, D> RefUnwindSafe for EClass<L, D> where
    D: RefUnwindSafe,
    L: RefUnwindSafe

impl<L, D> Send for EClass<L, D> where
    D: Send,
    L: Send

impl<L, D> Sync for EClass<L, D> where
    D: Sync,
    L: Sync

impl<L, D> Unpin for EClass<L, D> where
    D: Unpin,
    L: Unpin

impl<L, D> UnwindSafe for EClass<L, D> where
    D: UnwindSafe,
    L: 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.