Trait eclectic::map::OccupiedEntry [] [src]

pub trait OccupiedEntry<'a> {
    type Key: 'a;
    type Value: 'a;
    fn get(&self) -> &Self::Value;
    fn get_mut(&mut self) -> &mut Self::Value;
    fn into_mut(self) -> &'a mut Self::Value;
    fn remove(self) -> Self::Value;

    fn insert(&mut self, value: Self::Value) -> Self::Value { ... }
}

An occupied map entry.

'a is the lifetime of the map.

Associated Types

type Key: 'a

The type of the map's keys.

type Value: 'a

The type of the map's values.

Required Methods

fn get(&self) -> &Self::Value

Returns a reference to the entry's value.

fn get_mut(&mut self) -> &mut Self::Value

Returns a mutable reference to the entry's value.

fn into_mut(self) -> &'a mut Self::Value

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

fn remove(self) -> Self::Value

Removes the entry from the map and returns its value.

Provided Methods

fn insert(&mut self, value: Self::Value) -> Self::Value

Replaces the entry's value with the given one and returns the old value.

Implementors