Enum polymap::polymap::Entry [] [src]

pub enum Entry<'a, K: 'a, V: Any> {
    Occupied(OccupiedEntry<'a, K, V>),
    Vacant(VacantEntry<'a, K, V>),
}

A view into a single entry in a map, which may be either vacant or occupied.

This enum is returned from the entry method on PolyMap.

Variants

An occupied entry

A vacant entry

Methods

impl<'a, K, V: Any> Entry<'a, K, V>
[src]

Inserts a value if empty, then returns a mutable reference.

Inserts a value if empty using the given function, then returns a mutable reference.

Returns a reference to the entry's key.

Trait Implementations

impl<'a, K: 'a + Debug, V: Any + Debug> Debug for Entry<'a, K, V>
[src]

Formats the value using the given formatter.