Struct agb_hashmap::OccupiedEntry
source · pub struct OccupiedEntry<'a, K: 'a, V: 'a, ALLOCATOR: Allocator> { /* private fields */ }
Expand description
A view into an occupied entry in a HashMap
. This is part of the crate::Entry
enum.
Implementations§
source§impl<'a, K: 'a, V: 'a, ALLOCATOR: ClonableAllocator> OccupiedEntry<'a, K, V, ALLOCATOR>
impl<'a, K: 'a, V: 'a, ALLOCATOR: ClonableAllocator> OccupiedEntry<'a, K, V, ALLOCATOR>
sourcepub fn remove_entry(self) -> (K, V)
pub fn remove_entry(self) -> (K, V)
Take the ownership of the key and value from the map.
sourcepub fn get_mut(&mut self) -> &mut V
pub fn get_mut(&mut self) -> &mut V
Gets a mutable reference to the value in the entry.
If you need a reference to the OccupiedEntry
which may outlive the destruction
of the Entry
value, see into_mut
.
sourcepub fn into_mut(self) -> &'a mut V
pub fn into_mut(self) -> &'a mut V
Converts the OccupiedEntry
into a mutable reference to the value in the entry with
a lifetime bound to the map itself.
If you need multiple references to the OccupiedEntry
, see get_mut
.
Auto Trait Implementations§
impl<'a, K, V, ALLOCATOR> RefUnwindSafe for OccupiedEntry<'a, K, V, ALLOCATOR>
impl<'a, K, V, ALLOCATOR> Send for OccupiedEntry<'a, K, V, ALLOCATOR>
impl<'a, K, V, ALLOCATOR> Sync for OccupiedEntry<'a, K, V, ALLOCATOR>
impl<'a, K, V, ALLOCATOR> Unpin for OccupiedEntry<'a, K, V, ALLOCATOR>where
K: Unpin,
impl<'a, K, V, ALLOCATOR> !UnwindSafe for OccupiedEntry<'a, K, V, ALLOCATOR>
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