#[repr(C)]struct InternalNode<K, V> {
data: LeafNode<K, V>,
edges: [MaybeUninit<NonNull<LeafNode<K, V>>>; 12],
}Expand description
The underlying representation of internal nodes. As with LeafNodes, these should be hidden
behind BoxedNodes to prevent dropping uninitialized keys and values. Any pointer to an
InternalNode can be directly cast to a pointer to the underlying LeafNode portion of the
node, allowing code to act on leaf and internal nodes generically without having to even check
which of the two a pointer is pointing at. This property is enabled by the use of repr(C).
Fields§
§data: LeafNode<K, V>§edges: [MaybeUninit<NonNull<LeafNode<K, V>>>; 12]The pointers to the children of this node. len + 1 of these are considered
initialized and valid, except that near the end, while the tree is held
through borrow type Dying, some of these pointers are dangling.
Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for InternalNode<K, V>
impl<K, V> RefUnwindSafe for InternalNode<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> !Send for InternalNode<K, V>
impl<K, V> !Sync for InternalNode<K, V>
impl<K, V> Unpin for InternalNode<K, V>
impl<K, V> UnwindSafe for InternalNode<K, V>
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const SIZE: usize = _
#[doc(hidden)] const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const ALIGN: usize = _
#[doc(hidden)] const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more