pub struct OccupiedEntry<'a, K: Key, V: Value, S: Stats> { /* private fields */ }Expand description
Entry for an existing key-value pair in the tree
Implementations§
Source§impl<'a, K: Key, V: Value, S: Stats> OccupiedEntry<'a, K, V, S>
impl<'a, K: Key, V: Value, S: Stats> OccupiedEntry<'a, K, V, S>
Sourcepub fn remove_entry(self) -> (K, V)
pub fn remove_entry(self) -> (K, V)
Remove the key-value pair from the tree and return the key and value
Sourcepub fn into_mut(self) -> &'a mut V
pub fn into_mut(self) -> &'a mut V
Convert the OccupiedEntry into a mutable reference bounded by the tree’s lifetime
Sourcepub fn peek_backward<'b>(&'b self) -> Option<(&'b K, &'b V)>
pub fn peek_backward<'b>(&'b self) -> Option<(&'b K, &'b V)>
Peak previous OccupiedEntry
Sourcepub fn peek_forward<'b>(&'b self) -> Option<(&'b K, &'b V)>
pub fn peek_forward<'b>(&'b self) -> Option<(&'b K, &'b V)>
Peak the next OccupiedEntry
Sourcepub fn move_backward(self) -> Result<Self, Self>
pub fn move_backward(self) -> Result<Self, Self>
Move to previous OccupiedEntry
When reaching the front, return the original entry in Err()
Sourcepub fn move_forward(self) -> Result<Self, Self>
pub fn move_forward(self) -> Result<Self, Self>
Move to next OccupiedEntry
When reaching the end, return the original entry in Err()
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V, S> !Sync for OccupiedEntry<'a, K, V, S>
impl<'a, K, V, S> Freeze for OccupiedEntry<'a, K, V, S>
impl<'a, K, V, S> RefUnwindSafe for OccupiedEntry<'a, K, V, S>where
<S as StatsPriv>::EntryInner<'a, K, V>: RefUnwindSafe,
LeafNode<K, V>: RefUnwindSafe,
impl<'a, K, V, S> Send for OccupiedEntry<'a, K, V, S>
impl<'a, K, V, S> Unpin for OccupiedEntry<'a, K, V, S>
impl<'a, K, V, S> UnsafeUnpin for OccupiedEntry<'a, K, V, S>where
<S as StatsPriv>::EntryInner<'a, K, V>: UnsafeUnpin,
LeafNode<K, V>: UnsafeUnpin,
impl<'a, K, V, S> UnwindSafe for OccupiedEntry<'a, K, V, S>where
<S as StatsPriv>::EntryInner<'a, K, V>: UnwindSafe,
LeafNode<K, 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