Enum weak_table::weak_weak_hash_map::Entry
[−]
[src]
pub enum Entry<'a, K: 'a + WeakKey, V: 'a + WeakElement> { Occupied(OccupiedEntry<'a, K, V>), Vacant(VacantEntry<'a, K, V>), }
Represents an entry in the table which may be occupied or vacant.
Variants
Occupied(OccupiedEntry<'a, K, V>)
Vacant(VacantEntry<'a, K, V>)
Methods
impl<'a, K: WeakKey, V: WeakElement> Entry<'a, K, V>
[src]
impl<'a, K: WeakKey, V: WeakElement> Entry<'a, K, V>
pub fn or_insert(self, default: V::Strong) -> V::Strong
[src]
pub fn or_insert(self, default: V::Strong) -> V::Strong
Ensures a value is in the entry by inserting a default value if empty, and returns a mutable reference to the value in the entry.
pub fn or_insert_with<F: FnOnce() -> V::Strong>(self, default: F) -> V::Strong
[src]
pub fn or_insert_with<F: FnOnce() -> V::Strong>(self, default: F) -> V::Strong
Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.
pub fn key(&self) -> &K::Strong
[src]
pub fn key(&self) -> &K::Strong
Returns a reference to this entry's key.
Trait Implementations
impl<'a, K: WeakKey, V: WeakElement> Debug for Entry<'a, K, V> where
K::Strong: Debug,
V::Strong: Debug,
[src]
impl<'a, K: WeakKey, V: WeakElement> Debug for Entry<'a, K, V> where
K::Strong: Debug,
V::Strong: Debug,
Auto Trait Implementations
impl<'a, K, V> Send for Entry<'a, K, V> where
K: Send,
V: Send,
<K as WeakElement>::Strong: Send,
<V as WeakElement>::Strong: Send,
impl<'a, K, V> Send for Entry<'a, K, V> where
K: Send,
V: Send,
<K as WeakElement>::Strong: Send,
<V as WeakElement>::Strong: Send,
impl<'a, K, V> Sync for Entry<'a, K, V> where
K: Sync,
V: Sync,
<K as WeakElement>::Strong: Sync,
<V as WeakElement>::Strong: Sync,
impl<'a, K, V> Sync for Entry<'a, K, V> where
K: Sync,
V: Sync,
<K as WeakElement>::Strong: Sync,
<V as WeakElement>::Strong: Sync,