Enum eclectic::map::Entry
[−]
[src]
pub enum Entry<'a, M: ?Sized + EntryMap<'a>> { Occupied(M::OccupiedEntry), Vacant(M::VacantEntry), }
A map entry.
Variants
Occupied(M::OccupiedEntry)
An occupied map entry.
Vacant(M::VacantEntry)
A vacant map entry.
Methods
impl<'a, M: ?Sized + EntryMap<'a>> Entry<'a, M>
[src]
fn or_insert(self, default: M::Value) -> &'a mut M::Value
Ensures the entry is occupied by inserting it with the given default value if it is vacant.
fn or_insert_with<F: FnOnce() -> M::Value>(self, f: F) -> &'a mut M::Value
Ensures the entry is occupied by inserting it with the result of the given function if it is vacant.