Enum eclectic::map::Entry [] [src]

pub enum Entry<'a, K: 'a, V: 'a> {
    Occupied(Box<OccupiedEntry<Key=K, Value=V, MutValue=&'a mut V> + 'a>),
    Vacant(Box<VacantEntry<Key=K, Value=V, MutValue=&'a mut V> + 'a>),
}

A map entry.

Variants

An occupied map entry.

A vacant map entry.

Methods

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

Ensures that the entry is occupied by inserting it into the map with the given value if it is vacant.

Returns a mutable reference to the entry's value with the same lifetime as the map.

Ensures that the entry is occupied by inserting it into the map with the result of the given function if it is vacant.

Returns a mutable reference to the entry's value with the same lifetime as the map.