Struct weak_table::weak_weak_hash_map::OccupiedEntry
source · [−]pub struct OccupiedEntry<'a, K: 'a + WeakKey, V: 'a + WeakElement> { /* private fields */ }
Expand description
An occupied entry, which can be removed or viewed.
Implementations
sourceimpl<'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> RefUnwindSafe for OccupiedEntry<'a, K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
<K as WeakElement>::Strong: RefUnwindSafe,
<V as WeakElement>::Strong: RefUnwindSafe,
impl<'a, K, V> Send for OccupiedEntry<'a, K, V> where
K: Send,
V: Send,
<K as WeakElement>::Strong: Send,
<V as WeakElement>::Strong: Send,
impl<'a, K, V> Sync for OccupiedEntry<'a, K, V> where
K: Sync,
V: Sync,
<K as WeakElement>::Strong: Sync,
<V as WeakElement>::Strong: Sync,
impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V> where
<K as WeakElement>::Strong: Unpin,
<V as WeakElement>::Strong: Unpin,
impl<'a, K, V> !UnwindSafe for OccupiedEntry<'a, K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more