Enum ritelinked::linked_hash_map::Entry [−][src]
pub enum Entry<'a, K, V, S> {
Occupied(OccupiedEntry<'a, K, V>),
Vacant(VacantEntry<'a, K, V, S>),
}
Variants
Tuple Fields of Occupied
0: OccupiedEntry<'a, K, V>
Tuple Fields of Vacant
0: VacantEntry<'a, K, V, S>
Implementations
If this entry is vacant, inserts a new entry with the given value and returns a reference to it.
If this entry is occupied, this method moves the occupied entry to the back of the internal linked list and returns a reference to the existing value.
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V where
K: Hash,
S: BuildHasher,
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V where
K: Hash,
S: BuildHasher,
Similar to Entry::or_insert
, but accepts a function to construct a new value if this entry
is vacant.