struct LeafNode<K, V> {
parent: Option<NonNull<InternalNode<K, V>>>,
parent_idx: MaybeUninit<u16>,
len: u16,
keys: [MaybeUninit<K>; 11],
vals: [MaybeUninit<V>; 11],
}
Expand description
The underlying representation of leaf nodes and part of the representation of internal nodes.
Fields§
§parent: Option<NonNull<InternalNode<K, V>>>
We want to be covariant in K
and V
.
parent_idx: MaybeUninit<u16>
This node’s index into the parent node’s edges
array.
*node.parent.edges[node.parent_idx]
should be the same thing as node
.
This is only guaranteed to be initialized when parent
is non-null.
len: u16
The number of keys and values this node stores.
keys: [MaybeUninit<K>; 11]
The arrays storing the actual data of the node. Only the first len
elements of each
array are initialized and valid.
vals: [MaybeUninit<V>; 11]
Implementations§
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for LeafNode<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> !Send for LeafNode<K, V>
impl<K, V> !Sync for LeafNode<K, V>
impl<K, V> Unpin for LeafNode<K, V>where K: Unpin, V: Unpin,
impl<K, V> UnwindSafe for LeafNode<K, V>where K: UnwindSafe + RefUnwindSafe, V: UnwindSafe + RefUnwindSafe,
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