Enum bson::document::Entry [−][src]
pub enum Entry<'a> {
Occupied(OccupiedEntry<'a>),
Vacant(VacantEntry<'a>),
}
Expand description
A view into a single entry in a map, which may either be vacant or occupied.
This enum is constructed from the entry method on HashMap.
Variants
Occupied(OccupiedEntry<'a>)
An occupied entry.
Tuple Fields of Occupied
0: OccupiedEntry<'a>
Vacant(VacantEntry<'a>)
A vacant entry.
Tuple Fields of Vacant
0: VacantEntry<'a>
Implementations
Inserts the given default value in the entry if it is vacant and returns a mutable reference to it. Otherwise a mutable reference to an already existent value is returned.
Inserts the result of the default
function in the entry if it is vacant and returns a
mutable reference to it. Otherwise a mutable reference to an already existent value is
returned.