Enum weak_table::weak_key_hash_map::Entry
[−]
[src]
pub enum Entry<'a, K: 'a + WeakKey, V: 'a> { 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> Entry<'a, K, V>
[src]
impl<'a, K: WeakKey, V> Entry<'a, K, V>
pub fn or_insert(self, default: V) -> &'a mut V
[src]
pub fn or_insert(self, default: V) -> &'a mut V
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>(self, default: F) -> &'a mut V
[src]
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V
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.