pub struct InnerNode256<K, V> {
    pub header: Header,
    pub child_pointers: [Option<OpaqueNodePtr<K, V>>; 256],
}
Expand description

Node that references between 49 and 256 children

Fields§

§header: Header

The common node fields.

§child_pointers: [Option<OpaqueNodePtr<K, V>>; 256]

An array that directly maps a key byte (as index) to a child node.

Implementations§

source§

impl<K, V> InnerNode256<K, V>

source

pub fn empty() -> Self

Create an empty InnerNode256.

Trait Implementations§

source§

impl<K, V> Clone for InnerNode256<K, V>

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> Debug for InnerNode256<K, V>

source§

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

Formats the value using the given formatter. Read more
source§

impl<K, V> InnerNode for InnerNode256<K, V>

§

type GrownNode = InnerNode256<K, V>

The type of the next larger node type.
§

type Iter = InnerNode256Iter<K, V>

The type of the iterator over all children of the inner node
§

type ShrunkNode = InnerNode48<K, V>

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>>

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> )

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>>

Attempt to remove a child pointer at the key fragment from this inner node. Read more
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 header(&self) -> &Header

Access the header information for this node.
source§

fn header_mut(&mut self) -> &mut Header

Access the header information for this node.
source§

unsafe fn iter(&self) -> Self::Iter

Create an iterator over all (key bytes, child pointers) in this inner node. Read more
source§

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

Split the inner node at the given key-byte, returning a new InnerNode of the same type that contains all children including and after the given key fragment. The original inner node has those children removed. Read more
source§

fn num_children_after_split(&self, key_fragment: u8) -> (usize, usize)

This function will count the number of children before and after the split point. Read more
source§

fn is_full(&self) -> bool

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

impl<K, V> Node for InnerNode256<K, V>

§

type Key = K

The key type carried by the leafe nodes
§

type Value = V

The value type carried by the leaf nodes
source§

const TYPE: NodeType = NodeType::Node256

The runtime type of the node.
source§

impl<K, T> Visitable<K, T> for InnerNode256<K, T>

source§

fn super_visit_with<V: Visitor<K, T>>(&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>>(&self, visitor: &mut V) -> V::Output

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

impl<K, V> Sealed for InnerNode256<K, V>

Auto Trait Implementations§

§

impl<K, V> RefUnwindSafe for InnerNode256<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,

§

impl<K, V> !Send for InnerNode256<K, V>

§

impl<K, V> !Sync for InnerNode256<K, V>

§

impl<K, V> Unpin for InnerNode256<K, V>where K: Unpin, V: Unpin,

§

impl<K, V> UnwindSafe for InnerNode256<K, V>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.