Struct blart::InnerNode48
source · pub struct InnerNode48<K, V> {
pub header: Header,
pub child_indices: [RestrictedNodeIndex<48>; 256],
pub child_pointers: [MaybeUninit<OpaqueNodePtr<K, V>>; 48],
}
Expand description
Node that references between 17 and 49 children
Fields§
§header: Header
The common node fields.
child_indices: [RestrictedNodeIndex<48>; 256]
An array that maps key bytes (as the index) to the index value in the
child_pointers
array.
All the child_indices
values are guaranteed to be
PartialNodeIndex<48>::EMPTY
when the node is constructed.
child_pointers: [MaybeUninit<OpaqueNodePtr<K, V>>; 48]
For each element in this array, it is assumed to be initialized if there
is a index in the child_indices
array that points to it
Implementations§
source§impl<K, V> InnerNode48<K, V>
impl<K, V> InnerNode48<K, V>
sourcepub fn initialized_child_pointers(&self) -> &[OpaqueNodePtr<K, V>]
pub fn initialized_child_pointers(&self) -> &[OpaqueNodePtr<K, V>]
Return the initialized portions of the child pointer array.
Trait Implementations§
source§impl<K, V> Clone for InnerNode48<K, V>
impl<K, V> Clone for InnerNode48<K, V>
source§impl<K, V> Debug for InnerNode48<K, V>
impl<K, V> Debug for InnerNode48<K, V>
source§impl<K, V> InnerNode for InnerNode48<K, V>
impl<K, V> InnerNode for InnerNode48<K, V>
§type GrownNode = InnerNode256<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value>
type GrownNode = InnerNode256<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value>
The type of the next larger node type.
§type Iter = InnerNode48Iter<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value>
type Iter = InnerNode48Iter<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value>
The type of the iterator over all children of the inner node
§type ShrunkNode = InnerNodeCompressed<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value, 16>
type ShrunkNode = InnerNodeCompressed<<InnerNode48<K, V> as Node>::Key, <InnerNode48<K, V> as Node>::Value, 16>
The type of the next smaller node type.
source§fn lookup_child(
&self,
key_fragment: u8
) -> Option<OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value>>
fn lookup_child( &self, key_fragment: u8 ) -> Option<OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value>>
Search through this node for a child node that corresponds to the given
key fragment.
source§fn write_child(
&mut self,
key_fragment: u8,
child_pointer: OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value>
)
fn write_child( &mut self, key_fragment: u8, child_pointer: OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value> )
Write a child pointer with key fragment to this inner node. Read more
source§fn remove_child(
&mut self,
key_fragment: u8
) -> Option<OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value>>
fn remove_child( &mut self, key_fragment: u8 ) -> Option<OpaqueNodePtr<<Self as Node>::Key, <Self as Node>::Value>>
Attempt to remove a child pointer at the key fragment from this inner
node. Read more
source§fn grow(&self) -> Self::GrownNode
fn grow(&self) -> Self::GrownNode
Grow this node into the next larger class, copying over children and
prefix information.
source§fn shrink(&self) -> Self::ShrunkNode
fn shrink(&self) -> Self::ShrunkNode
Shrink this node into the next smaller class, copying over children and
prefix information. Read more
source§fn header_mut(&mut self) -> &mut Header
fn header_mut(&mut self) -> &mut Header
Access the header information for this node.
source§unsafe fn iter(&self) -> Self::Iter
unsafe fn iter(&self) -> Self::Iter
Create an iterator over all (key bytes, child pointers) in this inner
node. Read more
source§impl<K, V> Node for InnerNode48<K, V>
impl<K, V> Node for InnerNode48<K, V>
source§impl<K, T> Visitable<K, T> for InnerNode48<K, T>
impl<K, T> Visitable<K, T> for InnerNode48<K, T>
impl<K, V> Sealed for InnerNode48<K, V>
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for InnerNode48<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> !Send for InnerNode48<K, V>
impl<K, V> !Sync for InnerNode48<K, V>
impl<K, V> Unpin for InnerNode48<K, V>where K: Unpin, V: Unpin,
impl<K, V> UnwindSafe for InnerNode48<K, V>where K: UnwindSafe, V: 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