Struct kernel::rbtree::RBTreeNode
source · [−]pub struct RBTreeNode<K, V> { /* private fields */ }
Expand description
A red-black tree node.
The node is fully initialised (with key and value) and can be inserted into a tree without any extra allocations or failure paths.
Implementations
sourceimpl<K, V> RBTreeNode<K, V>
impl<K, V> RBTreeNode<K, V>
sourcepub fn into_reservation(self) -> RBTreeNodeReservation<K, V>
pub fn into_reservation(self) -> RBTreeNodeReservation<K, V>
“Uninitialises” a node.
It then becomes a reservation that can be re-initialised into a different node (i.e., with a different key and/or value).
The existing key and value are dropped in-place as part of this operation, that is, memory may be freed (but only for the key/value; memory for the node itself is kept for reuse).
Auto Trait Implementations
impl<K, V> RefUnwindSafe for RBTreeNode<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> !Send for RBTreeNode<K, V>
impl<K, V> !Sync for RBTreeNode<K, V>
impl<K, V> Unpin for RBTreeNode<K, V>
impl<K, V> UnwindSafe for RBTreeNode<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more