pub enum Tree<T, NT> {
Nullary,
Unary(T),
Binary(T, T),
Ternary(T, T, T),
Nary(NT),
}Expand description
Abstract node of a tree.
Tracks the arity (out-degree) of a node, which is the only thing that is needed for iteration purposes.
Variants§
Nullary
Combinator with no children.
Unary(T)
Combinator with one child.
Binary(T, T)
Combinator with two children.
Ternary(T, T, T)
Combinator with two children.
Nary(NT)
Combinator with more than two children.
Auto Trait Implementations§
impl<T, NT> Freeze for Tree<T, NT>
impl<T, NT> RefUnwindSafe for Tree<T, NT>where
T: RefUnwindSafe,
NT: RefUnwindSafe,
impl<T, NT> Send for Tree<T, NT>
impl<T, NT> Sync for Tree<T, NT>
impl<T, NT> Unpin for Tree<T, NT>
impl<T, NT> UnsafeUnpin for Tree<T, NT>where
T: UnsafeUnpin,
NT: UnsafeUnpin,
impl<T, NT> UnwindSafe for Tree<T, NT>where
T: UnwindSafe,
NT: 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