pub struct BinaryTree<T> { /* private fields */ }
Expand description
Wrapper around a ego_tree::Tree that constrains functionality / API to a binary tree. Always contains at least one node.
Implementations§
Source§impl<T> BinaryTree<T>
impl<T> BinaryTree<T>
pub fn new(root_value: T) -> Self
Sourcepub fn root(&self) -> BinaryNodeRef<'_, T>
pub fn root(&self) -> BinaryNodeRef<'_, T>
Returns a reference to the root node.
Sourcepub fn root_mut(&mut self) -> BinaryNodeMut<'_, T>
pub fn root_mut(&mut self) -> BinaryNodeMut<'_, T>
Returns a mutator of the root node.
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