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 TreeNodes based on the value it contains.
Fields§
§value: TThe value of this TreeNode
Implementations§
Trait Implementations§
impl<T: Eq> Eq for TreeNode<T>
Source§impl<T: Ord> Ord for TreeNode<T>
impl<T: Ord> Ord for TreeNode<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: Ord> PartialOrd for TreeNode<T>
impl<T: Ord> PartialOrd for TreeNode<T>
impl<T: PartialEq> 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> UnsafeUnpin for TreeNode<T>where
T: UnsafeUnpin,
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