pub enum BinaryNode {
Atomic,
Binary {
lhs: Arc<BinaryNode>,
rhs: Arc<BinaryNode>,
},
}
Expand description
A element in full binary tree Can be a atom or a node
Variants§
Implementations§
Source§impl BinaryNode
impl BinaryNode
Sourcepub fn as_rpn(&self) -> ReversePolishNotation
pub fn as_rpn(&self) -> ReversePolishNotation
Convert a full binary tree to reverse polish notation
Source§impl BinaryNode
impl BinaryNode
Sourcepub fn as_expression<V, O>(
&self,
values: Vec<V>,
actions: Vec<O>,
) -> Arc<ExpressionNode<V, O>>
pub fn as_expression<V, O>( &self, values: Vec<V>, actions: Vec<O>, ) -> Arc<ExpressionNode<V, O>>
Make the binary tree into an expression tree
Trait Implementations§
Source§impl Clone for BinaryNode
impl Clone for BinaryNode
Source§fn clone(&self) -> BinaryNode
fn clone(&self) -> BinaryNode
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BinaryNode
impl Debug for BinaryNode
Source§impl Default for BinaryNode
impl Default for BinaryNode
Source§impl Hash for BinaryNode
impl Hash for BinaryNode
Source§impl PartialEq for BinaryNode
impl PartialEq for BinaryNode
impl Eq for BinaryNode
impl StructuralPartialEq for BinaryNode
Auto Trait Implementations§
impl Freeze for BinaryNode
impl RefUnwindSafe for BinaryNode
impl Send for BinaryNode
impl Sync for BinaryNode
impl Unpin for BinaryNode
impl UnwindSafe for BinaryNode
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