pub struct OccupiedEntry<'a, K: 'a, V: 'a + WeakElement> { /* private fields */ }
Expand description
An occupied entry, which can be removed or viewed.
Implementations§
Source§impl<'a, K, V: WeakElement> OccupiedEntry<'a, K, V>
impl<'a, K, V: WeakElement> OccupiedEntry<'a, K, V>
Sourcepub fn remove_entry(self) -> (K, V::Strong)
pub fn remove_entry(self) -> (K, V::Strong)
Takes ownership of the key and value from the map.
expected O(1) time; worst-case O(p) time
Sourcepub fn get_strong(&self) -> V::Strong
pub fn get_strong(&self) -> V::Strong
Gets a copy of the strong value reference stored in the entry.
O(1) time
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>
impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>
impl<'a, K, V> Send for OccupiedEntry<'a, K, V>
impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>
impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V>
impl<'a, K, V> !UnwindSafe for OccupiedEntry<'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