Struct blart::InnerNodeCompressed
source · pub struct InnerNodeCompressed<K, V, const SIZE: usize> {
pub header: Header,
pub keys: [MaybeUninit<u8>; SIZE],
pub child_pointers: [MaybeUninit<OpaqueNodePtr<K, V>>; SIZE],
}
Expand description
Node type that has a compact representation for key bytes and children pointers.
Fields§
§header: Header
The common node fields.
keys: [MaybeUninit<u8>; SIZE]
An array that contains single key bytes in the same index as the
child_pointers
array contains the matching child tree.
This array will only be initialized for the first header.num_children
values.
child_pointers: [MaybeUninit<OpaqueNodePtr<K, V>>; SIZE]
An array that contains the child data.
This array will only be initialized for the first header.num_children
values.
Implementations§
source§impl<K, V, const SIZE: usize> InnerNodeCompressed<K, V, SIZE>
impl<K, V, const SIZE: usize> InnerNodeCompressed<K, V, SIZE>
sourcepub fn empty() -> Self
pub fn empty() -> Self
Create an empty InnerNodeCompressed
with the given NodeType
.
fn lookup_child_index(&self, key_fragment: u8) -> Option<usize>
sourcepub fn initialized_portion(&self) -> (&[u8], &[OpaqueNodePtr<K, V>])
pub fn initialized_portion(&self) -> (&[u8], &[OpaqueNodePtr<K, V>])
Return the initialized portions of the keys and child pointer arrays.
fn lookup_child_inner(&self, key_fragment: u8) -> Option<OpaqueNodePtr<K, V>>
fn write_child_inner( &mut self, key_fragment: u8, child_pointer: OpaqueNodePtr<K, V> )
fn remove_child_inner( &mut self, key_fragment: u8 ) -> Option<OpaqueNodePtr<K, V>>
fn change_block_size<const NEW_SIZE: usize>( &self ) -> InnerNodeCompressed<K, V, NEW_SIZE>
fn grow_node48(&self) -> InnerNode48<K, V>
fn split_at(&mut self, split_key_fragment: u8) -> Self
fn num_children_after_split(&self, split_key_fragment: u8) -> (usize, usize)
Trait Implementations§
source§impl<K, V, const SIZE: usize> Clone for InnerNodeCompressed<K, V, SIZE>
impl<K, V, const SIZE: usize> Clone for InnerNodeCompressed<K, V, SIZE>
Auto Trait Implementations§
impl<K, V, const SIZE: usize> RefUnwindSafe for InnerNodeCompressed<K, V, SIZE>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V, const SIZE: usize> !Send for InnerNodeCompressed<K, V, SIZE>
impl<K, V, const SIZE: usize> !Sync for InnerNodeCompressed<K, V, SIZE>
impl<K, V, const SIZE: usize> Unpin for InnerNodeCompressed<K, V, SIZE>where K: Unpin, V: Unpin,
impl<K, V, const SIZE: usize> UnwindSafe for InnerNodeCompressed<K, V, SIZE>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