pub trait BinaryTree<T>{
type Position;
// Required methods
fn left(&self, node: Self::Position) -> Option<Self::Position>;
fn right(&self, node: Self::Position) -> Option<Self::Position>;
fn sibling(&self, node: Self::Position) -> Option<Self::Position>;
}Expand description
Abstract interface definition for a binary tree type
Required Associated Types§
Required Methods§
Sourcefn left(&self, node: Self::Position) -> Option<Self::Position>
fn left(&self, node: Self::Position) -> Option<Self::Position>
Returns the position of the left child of a given node