Trait binary_tree::Node
[−]
[src]
pub trait Node {
type Value;
fn left(&self) -> Option<&Self>;
fn right(&self) -> Option<&Self>;
fn value(&self) -> &Self::Value;
fn walk<'a, F>(&'a self, step_in: F) where F: FnMut(&'a Self) -> WalkAction { ... }
}
Generic methods for traversing a binary tree.
Associated Types
type Value
Required Methods
fn left(&self) -> Option<&Self>
Get a reference to the left subtree
fn right(&self) -> Option<&Self>
Get a reference to the right subtree
fn value(&self) -> &Self::Value
Returns the value of the current node.
Provided Methods
fn walk<'a, F>(&'a self, step_in: F) where F: FnMut(&'a Self) -> WalkAction
Walk down the tree