Struct trie::map::OccupiedEntry [] [src]

pub struct OccupiedEntry<'a, T: 'a> {
    // some fields omitted
}

A view into an occupied entry in a map.

Methods

impl<'a, T> OccupiedEntry<'a, T>

fn get(&self) -> &T

Gets a reference to the value in the entry.

fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the value in the entry.

fn into_mut(self) -> &'a mut T

Converts the OccupiedEntry into a mutable reference to the value in the entry, with a lifetime bound to the map itself.

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

Sets the value of the entry, and returns the entry's old value.

fn remove(self) -> T

Takes the value out of the entry, and returns it.