pub struct VacantEntry<'a, K: Ord + Clone + Sized, V: Sized> { /* private fields */ }Available on crate feature
btree only.Expand description
Entry for a vacant key position in the tree
Implementations§
Source§impl<'a, K: Ord + Clone + Sized, V: Sized> VacantEntry<'a, K, V>
impl<'a, K: Ord + Clone + Sized, V: Sized> VacantEntry<'a, K, V>
Sourcepub fn peak_backward(&self) -> Option<(&'a K, &'a V)>
pub fn peak_backward(&self) -> Option<(&'a K, &'a V)>
Peak previous OccupiedEntry
Sourcepub fn peak_forward(&self) -> Option<(&'a K, &'a V)>
pub fn peak_forward(&self) -> Option<(&'a K, &'a V)>
Peak the next OccupiedEntry
Sourcepub fn move_backward(self) -> Result<OccupiedEntry<'a, K, V>, Self>
pub fn move_backward(self) -> Result<OccupiedEntry<'a, K, V>, Self>
Move to previous OccupiedEntry
When reaching the front return the original entry in Err()
Sourcepub fn move_forward(self) -> Result<OccupiedEntry<'a, K, V>, Self>
pub fn move_forward(self) -> Result<OccupiedEntry<'a, K, V>, Self>
Move to next OccupiedEntry
When reaching the end, return the original entry in Err()
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V> Freeze for VacantEntry<'a, K, V>where
K: Freeze,
impl<'a, K, V> RefUnwindSafe for VacantEntry<'a, K, V>where
K: RefUnwindSafe,
impl<'a, K, V> !Send for VacantEntry<'a, K, V>
impl<'a, K, V> !Sync for VacantEntry<'a, K, V>
impl<'a, K, V> Unpin for VacantEntry<'a, K, V>where
K: Unpin,
impl<'a, K, V> UnsafeUnpin for VacantEntry<'a, K, V>where
K: UnsafeUnpin,
impl<'a, K, V> !UnwindSafe for VacantEntry<'a, K, V>
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