pub struct TreeNode<T> {
pub value: T,
}
Expand description
A tree node that holds a value of type T
generic
This structure represents a single node in a binary tree. It holds a value of type T
and can
be compared to other TreeNode
s based on the value it contains.
Fields§
§value: T
The value
of this TreeNode
Implementations§
Trait Implementations§
Source§impl<T: Ord> Ord for TreeNode<T>
impl<T: Ord> Ord for TreeNode<T>
Source§impl<T: Ord> PartialOrd for TreeNode<T>
impl<T: Ord> PartialOrd for TreeNode<T>
impl<T: Eq> Eq for TreeNode<T>
impl<T> StructuralPartialEq for TreeNode<T>
Auto Trait Implementations§
impl<T> Freeze for TreeNode<T>where
T: Freeze,
impl<T> RefUnwindSafe for TreeNode<T>where
T: RefUnwindSafe,
impl<T> Send for TreeNode<T>where
T: Send,
impl<T> Sync for TreeNode<T>where
T: Sync,
impl<T> Unpin for TreeNode<T>where
T: Unpin,
impl<T> UnwindSafe for TreeNode<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