pub struct RecExpr<L> { /* private fields */ }
Expand description
A recursive expression from a user-defined Language
.
This conceptually represents a recursive expression, but it’s actually just a list of enodes.
RecExpr
s must satisfy the invariant that enodes’ children must refer to
elements that come before it in the list.
If the serde-1
feature is enabled, this implements
[serde::Serialize
][https://docs.rs/serde/latest/serde/trait.Serialize.html].
Implementations§
Source§impl<L> RecExpr<ENodeOrVar<L>>where
L: Language,
impl<L> RecExpr<ENodeOrVar<L>>where
L: Language,
Sourcepub fn alpha_rename(&self) -> RecExpr<ENodeOrVar<L>>
pub fn alpha_rename(&self) -> RecExpr<ENodeOrVar<L>>
Returns a new PatternAst
with the variables renames canonically
Trait Implementations§
Source§impl<L> Ord for RecExpr<L>where
L: Ord,
impl<L> Ord for RecExpr<L>where
L: Ord,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<L> PartialOrd for RecExpr<L>where
L: PartialOrd,
impl<L> PartialOrd for RecExpr<L>where
L: PartialOrd,
Source§impl<L> Serialize for RecExpr<L>
impl<L> Serialize for RecExpr<L>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<L> Eq for RecExpr<L>where
L: Eq,
impl<L> StructuralPartialEq for RecExpr<L>
Auto Trait Implementations§
impl<L> Freeze for RecExpr<L>
impl<L> RefUnwindSafe for RecExpr<L>where
L: RefUnwindSafe,
impl<L> Send for RecExpr<L>where
L: Send,
impl<L> Sync for RecExpr<L>where
L: Sync,
impl<L> Unpin for RecExpr<L>where
L: Unpin,
impl<L> UnwindSafe for RecExpr<L>where
L: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.