pub struct BinaryTree<T> {
pub root: Pointer,
/* private fields */
}
Fields§
§root: Pointer
Implementations§
Source§impl<T: PartialOrd + Copy + Debug> BinaryTree<T>
impl<T: PartialOrd + Copy + Debug> BinaryTree<T>
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn get_height(&self) -> u32
pub fn get_height_from_node(&self, node: Pointer) -> u32
pub fn insert(&mut self, val: T)
pub fn insert_below_node(&mut self, val: T, node: Pointer)
pub fn get_node(&self, val: T) -> Pointer
pub fn get_node_from_node(&self, node: Pointer, val: T) -> Pointer
pub fn count_leaf_nodes(&self) -> u32
pub fn count_leaf_nodes_from_node(&self, node: Pointer) -> u32
pub fn print_in_order_traversal(&self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BinaryTree<T>
impl<T> RefUnwindSafe for BinaryTree<T>where
T: RefUnwindSafe,
impl<T> Send for BinaryTree<T>where
T: Send,
impl<T> Sync for BinaryTree<T>where
T: Sync,
impl<T> Unpin for BinaryTree<T>where
T: Unpin,
impl<T> UnwindSafe for BinaryTree<T>where
T: 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