pub enum TreePath<K, V, const PREFIX_LEN: usize> {
Root,
ChildOfRoot {
parent: OpaqueNodePtr<K, V, PREFIX_LEN>,
child_key_byte: u8,
},
Normal {
grandparent: OpaqueNodePtr<K, V, PREFIX_LEN>,
parent_key_byte: u8,
parent: OpaqueNodePtr<K, V, PREFIX_LEN>,
child_key_byte: u8,
},
}Expand description
This enum represents different kinds of tree paths pointing to a leaf node.
Each variant contains information that is useful when inserting or deleting a leaf at the implied location.
Variants§
Root
This variant indicates a tree with only a single leaf node as root.
It has no grandparent or parent node.
ChildOfRoot
This variant indicates a tree with a non-leaf root, and the leaf node we’re pointed to is a direct child of the root.
The leaf has no grandparent node.
Fields
§
parent: OpaqueNodePtr<K, V, PREFIX_LEN>A pointer to the root node of the tree.
Normal
This variant covers all other tree cases, where the leaf node has both a parent and a grandparent node.
Fields
§
grandparent: OpaqueNodePtr<K, V, PREFIX_LEN>A pointer to the grandparent node.
§
parent_key_byte: u8The key byte which selects the parent node when used as lookup in the grandparent.
§
parent: OpaqueNodePtr<K, V, PREFIX_LEN>A pointer to the parent node.
Trait Implementations§
impl<K, V, const PREFIX_LEN: usize> Copy for TreePath<K, V, PREFIX_LEN>
Auto Trait Implementations§
impl<K, V, const PREFIX_LEN: usize> Freeze for TreePath<K, V, PREFIX_LEN>
impl<K, V, const PREFIX_LEN: usize> RefUnwindSafe for TreePath<K, V, PREFIX_LEN>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V, const PREFIX_LEN: usize> !Send for TreePath<K, V, PREFIX_LEN>
impl<K, V, const PREFIX_LEN: usize> !Sync for TreePath<K, V, PREFIX_LEN>
impl<K, V, const PREFIX_LEN: usize> Unpin for TreePath<K, V, PREFIX_LEN>
impl<K, V, const PREFIX_LEN: usize> UnwindSafe for TreePath<K, V, PREFIX_LEN>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