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>

source

pub fn empty() -> Self

Create an empty InnerNodeCompressed with the given NodeType.

source

fn lookup_child_index(&self, key_fragment: u8) -> Option<usize>

source

pub fn initialized_portion(&self) -> (&[u8], &[OpaqueNodePtr<K, V>])

Return the initialized portions of the keys and child pointer arrays.

source

fn lookup_child_inner(&self, key_fragment: u8) -> Option<OpaqueNodePtr<K, V>>

source

fn write_child_inner( &mut self, key_fragment: u8, child_pointer: OpaqueNodePtr<K, V> )

source

fn remove_child_inner( &mut self, key_fragment: u8 ) -> Option<OpaqueNodePtr<K, V>>

source

fn change_block_size<const NEW_SIZE: usize>( &self ) -> InnerNodeCompressed<K, V, NEW_SIZE>

source

fn grow_node48(&self) -> InnerNode48<K, V>

source

fn split_at(&mut self, split_key_fragment: u8) -> Self

source

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>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<K, V, const SIZE: usize> Debug for InnerNodeCompressed<K, V, SIZE>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.