Enum weak_table::weak_value_hash_map::Entry
[−]
[src]
pub enum Entry<'a, K: 'a, 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, V: WeakElement> Entry<'a, K, V>
[src]
impl<'a, K, 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.
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.
pub fn key(&self) -> &K
[src]
pub fn key(&self) -> &K
Returns a reference to this entry's key.