pub enum InsertPosition {
BelowLeaf,
AlreadyExists,
ReplaceNode,
}
Expand description
Result of key lookup in tree
Found node is passed somewhere else (probably remembered in a “walk” stack).
Variants§
BelowLeaf
Found node that is a leaf; its key is a prefix of the target key (but not equal to it)
Inserting the target key must convert the found node into an inner node and insert the target key as leaf.
AlreadyExists
Found node with target key
ReplaceNode
Found node to replace with target key
Parent node is a prefix of target key, but this node is not.
To insert a new node needs to replace the current one, using the shared prefix of this node and the target key as node key. (This node key could still be the target key.)
Trait Implementations§
source§impl Clone for InsertPosition
impl Clone for InsertPosition
source§fn clone(&self) -> InsertPosition
fn clone(&self) -> InsertPosition
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InsertPosition
impl Debug for InsertPosition
source§impl<N> From<InsertPositionWith<N>> for InsertPosition
impl<N> From<InsertPositionWith<N>> for InsertPosition
source§fn from(value: InsertPositionWith<N>) -> Self
fn from(value: InsertPositionWith<N>) -> Self
Converts to this type from the input type.
source§impl PartialEq for InsertPosition
impl PartialEq for InsertPosition
impl Copy for InsertPosition
impl Eq for InsertPosition
impl StructuralPartialEq for InsertPosition
Auto Trait Implementations§
impl Freeze for InsertPosition
impl RefUnwindSafe for InsertPosition
impl Send for InsertPosition
impl Sync for InsertPosition
impl Unpin for InsertPosition
impl UnwindSafe for InsertPosition
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)