pub enum InsertPositionWith<N> {
BelowLeaf(N),
AlreadyExists(N),
ReplaceNode(N),
}
Expand description
Result of finding position to insert a target key
Variants§
BelowLeaf(N)
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(N)
Found node with target key
ReplaceNode(N)
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<N: Debug> Debug for InsertPositionWith<N>
impl<N: Debug> Debug for InsertPositionWith<N>
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.
Auto Trait Implementations§
impl<N> Freeze for InsertPositionWith<N>where
N: Freeze,
impl<N> RefUnwindSafe for InsertPositionWith<N>where
N: RefUnwindSafe,
impl<N> Send for InsertPositionWith<N>where
N: Send,
impl<N> Sync for InsertPositionWith<N>where
N: Sync,
impl<N> Unpin for InsertPositionWith<N>where
N: Unpin,
impl<N> UnwindSafe for InsertPositionWith<N>where
N: 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