pub enum Entry<'a, A: ?Sized + UncheckedAnyExt, V: 'a> {
Occupied(OccupiedEntry<'a, A, V>),
Vacant(VacantEntry<'a, A, V>),
}
Expand description
A view into a single location in an Map
, which may be vacant or occupied.
Variants
Occupied(OccupiedEntry<'a, A, V>)
An occupied Entry
Vacant(VacantEntry<'a, A, V>)
A vacant Entry
Implementations
Ensures a value is in the entry by inserting the default if empty, and returns a mutable reference to the value in the entry.
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.
Ensures a value is in the entry by inserting the default value if empty, and returns a mutable reference to the value in the entry.
Provides in-place mutable access to an occupied entry before any potential inserts into the map.