pub struct OccupiedEntry<'a, K: 'a + WeakKey, V: 'a + WeakElement> { /* private fields */ }
Expand description
An occupied entry, which can be removed or viewed.
Implementations§
Source§impl<'a, K: WeakKey, V: WeakElement> OccupiedEntry<'a, K, V>
impl<'a, K: WeakKey, V: WeakElement> OccupiedEntry<'a, K, V>
Sourcepub fn remove_entry(self) -> (K::Strong, V::Strong)
pub fn remove_entry(self) -> (K::Strong, 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 clone of the reference to the value 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>where
<V as WeakElement>::Strong: RefUnwindSafe,
<K as WeakElement>::Strong: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
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