Skip to main content

InnerNode16

Type Alias InnerNode16 

Source
pub type InnerNode16<K, V, const PREFIX_LEN: usize> = InnerNodeSorted<K, V, PREFIX_LEN, 16>;
Expand description

Node that references between 5 and 16 children

Aliased Type§

#[repr(C, align(8))]
pub struct InnerNode16<K, V, const PREFIX_LEN: usize> { pub header: Header<PREFIX_LEN>, pub child_pointers: [MaybeUninit<OpaqueNodePtr<K, V, PREFIX_LEN>>; 16], pub keys: [u8; 16], }

Fields§

§header: Header<PREFIX_LEN>

The common node fields.

§child_pointers: [MaybeUninit<OpaqueNodePtr<K, V, PREFIX_LEN>>; 16]

An array that contains the child data.

This array will only be initialized for the first header.num_children values.

§keys: [u8; 16]

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.

Trait Implementations§

Source§

impl<K, V, const PREFIX_LEN: usize> InnerNode<PREFIX_LEN> for InnerNode16<K, V, PREFIX_LEN>

Source§

type GrownNode = InnerNodeIndirect<K, V, PREFIX_LEN, 48>

The type of the next larger node type.
Source§

type ShrunkNode = InnerNodeSorted<K, V, PREFIX_LEN, 4>

The type of the next smaller node type.
Source§

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

Shrink this node into the next smaller class, copying over children and prefix information. Read more
Source§

fn is_full(&self) -> bool

Returns true if this node has no more space to store children.
Source§

impl<K, V, const PREFIX_LEN: usize> Node<PREFIX_LEN> for InnerNode16<K, V, PREFIX_LEN>

Source§

const TYPE: NodeType = NodeType::Node16

The runtime type of the node.
Source§

type Key = K

The key type carried by the leaf nodes
Source§

type Value = V

The value type carried by the leaf nodes
Source§

impl<K, T, const PREFIX_LEN: usize> Visitable<K, T, PREFIX_LEN> for InnerNode16<K, T, PREFIX_LEN>

Source§

fn super_visit_with<V: Visitor<K, T, PREFIX_LEN>>( &self, visitor: &mut V, ) -> V::Output

This function provides the default traversal behavior for the implementing type. Read more
Source§

fn visit_with<V: Visitor<K, T, PREFIX_LEN>>(&self, visitor: &mut V) -> V::Output

This function will traverse the implementing type and execute any specific logic from the given Visitor. Read more