Enum polymap::typemap::Entry
[−]
[src]
pub enum Entry<'a, V: Any> { Occupied(OccupiedEntry<'a, V>), Vacant(VacantEntry<'a, V>), }
A view into a single entry in a map, which may be either vacant or occupied.
Variants
Occupied(OccupiedEntry<'a, V>)
An occupied entry
Vacant(VacantEntry<'a, V>)
A vacant entry
Methods
impl<'a, V: Any> Entry<'a, V>
[src]
fn or_insert(self, default: V) -> &'a mut V
Inserts a value if empty, then returns a mutable reference.
fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V
Inserts a value if empty using the given function, then returns a mutable reference.