[−][src]Struct egg::SymbolLang
A simple language used for testing.
Fields
op: Symbol
The operator for an enode
children: Vec<Id>
The enode's children Id
s
Implementations
impl SymbolLang
[src]
pub fn new(op: impl Into<Symbol>, children: Vec<Id>) -> Self
[src]
Create an enode with the given string and children
pub fn leaf(op: impl Into<Symbol>) -> Self
[src]
Create childless enode with the given string
Trait Implementations
impl Clone for SymbolLang
[src]
fn clone(&self) -> SymbolLang
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SymbolLang
[src]
impl Eq for SymbolLang
[src]
impl Hash for SymbolLang
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Language for SymbolLang
[src]
fn matches(&self, other: &Self) -> bool
[src]
fn children(&self) -> &[Id]
[src]
fn children_mut(&mut self) -> &mut [Id]
[src]
fn display_op(&self) -> &dyn Display
[src]
fn from_op_str(op_str: &str, children: Vec<Id>) -> Result<Self, String>
[src]
fn for_each<F: FnMut(Id)>(&self, f: F)
[src]
fn for_each_mut<F: FnMut(&mut Id)>(&mut self, f: F)
[src]
fn len(&self) -> usize
[src]
fn is_leaf(&self) -> bool
[src]
fn update_children<F: FnMut(Id) -> Id>(&mut self, f: F)
[src]
fn map_children<F: FnMut(Id) -> Id>(self, f: F) -> Self
[src]
fn fold<F, T>(&self, init: T, f: F) -> T where
F: FnMut(T, Id) -> T,
T: Clone,
[src]
F: FnMut(T, Id) -> T,
T: Clone,
fn to_recexpr<'a, F>(&self, child_recexpr: F) -> RecExpr<Self> where
Self: 'a,
F: FnMut(Id) -> &'a [Self],
[src]
Self: 'a,
F: FnMut(Id) -> &'a [Self],
impl Ord for SymbolLang
[src]
fn cmp(&self, other: &SymbolLang) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SymbolLang> for SymbolLang
[src]
fn eq(&self, other: &SymbolLang) -> bool
[src]
fn ne(&self, other: &SymbolLang) -> bool
[src]
impl PartialOrd<SymbolLang> for SymbolLang
[src]
fn partial_cmp(&self, other: &SymbolLang) -> Option<Ordering>
[src]
fn lt(&self, other: &SymbolLang) -> bool
[src]
fn le(&self, other: &SymbolLang) -> bool
[src]
fn gt(&self, other: &SymbolLang) -> bool
[src]
fn ge(&self, other: &SymbolLang) -> bool
[src]
impl StructuralEq for SymbolLang
[src]
impl StructuralPartialEq for SymbolLang
[src]
Auto Trait Implementations
impl RefUnwindSafe for SymbolLang
impl Send for SymbolLang
impl Sync for SymbolLang
impl Unpin for SymbolLang
impl UnwindSafe for SymbolLang
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,