pub struct OccupiedEntry<'a, V>(/* private fields */);Expand description
Allows for in-place manipulation of existing table entries
Implementations§
Source§impl<'a, V> OccupiedEntry<'a, V>
impl<'a, V> OccupiedEntry<'a, V>
Sourcepub fn get_mut(&mut self) -> &mut V
pub fn get_mut(&mut self) -> &mut V
Returns a mutable reference to the value pointed to by this entry
Sourcepub fn insert(&mut self, new_val: V) -> V
pub fn insert(&mut self, new_val: V) -> V
Inserts a new value into the entry, returning the old one.
Sourcepub fn into_mut(self) -> &'a mut V
pub fn into_mut(self) -> &'a mut V
Consumes this entry and returns the raw mutable reference of the value.
Sourcepub fn remove_entry(self) -> (u64, V)
pub fn remove_entry(self) -> (u64, V)
Take the ownership of the key and value from the map.
Trait Implementations§
Auto Trait Implementations§
impl<'a, V> Freeze for OccupiedEntry<'a, V>
impl<'a, V> RefUnwindSafe for OccupiedEntry<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for OccupiedEntry<'a, V>where
V: Send,
impl<'a, V> Sync for OccupiedEntry<'a, V>where
V: Sync,
impl<'a, V> Unpin for OccupiedEntry<'a, V>
impl<'a, V> !UnwindSafe for OccupiedEntry<'a, 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