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

Returns a reference to this entry’s key.

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.