pub trait OccupiedEntry<'c>: Sized {
    type Value: 'c;
    fn get_value<'e>(&'e self) -> &'e Self::Value
    where
        'c: 'e
;
fn get_value_mut<'e>(&'e mut self) -> &mut Self::Value
    where
        'c: 'e
;
fn into_value_mut<'e>(self) -> &'c mut Self::Value; fn replace_value<'e>(&'e mut self, value: Self::Value) -> Self::Value
    where
        'c: 'e
, { ... } }
Expand description

A trait to represent an occupied entry of a collection.

this can be thought of as holding a &mut V into the collection.

Associated Types

the type of the values in the collection

Required methods

get the value, immutably borrowed.

get the value, mutably borrowed.

convert the entry into a mutable to the value.

Provided methods

replace the value in the entry, returning the old value.

Implementors