pub enum ENodeOrVar<L> {
    ENode(L),
    Var(Var),
}
Expand description

The language of Patterns.

Variants

ENode(L)

An enode from the underlying Language

Var(Var)

A pattern variable

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The error type returned by from_op if its arguments do not represent a valid e-node. Read more

Parse an e-node with operator op and children children.

Feeds this value into the given Hasher. Read more

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

Type representing the cases of this language. Read more

Return the Discriminant of this node.

Returns true if this enode matches another enode. This should only consider the operator, not the children Ids. Read more

Returns the children of this e-node.

Returns a mutable slice of the children of this e-node.

Runs a given function on each child Id.

Runs a given function on each child Id, allowing mutation of that Id.

Runs a falliable function on each child, stopping if the function returns an error. Read more

Returns the number of the children this enode has. Read more

Returns true if this enode has no children.

Runs a given function to replace the children.

Creates a new enode with children determined by the given function.

Folds over the children, given an initial accumulator.

Returns true if the predicate is true on all children. Does not short circuit. Read more

Returns true if the predicate is true on any children. Does not short circuit. Read more

Make a RecExpr by mapping this enodes children to other RecExprs. Read more

Build a RecExpr from an e-node. Read more

Same as Language::build_recexpr, but fallible.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.