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

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

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

An occupied map entry.

Associated Types

type Key

The type of the entry's key.

type Value

The type of the entry's value.

type MutValue

The type of the mutable reference to the entry's value with the same lifetime as the map.

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: Box<Self>) -> Self::MutValue

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

fn remove(self: Box<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