Struct OccupiedEntry

struct OccupiedEntry<'a, K, V> { ... }

An occupied Entry. It is part of the Entry enum.

Implementations

impl<'a, K: Ord, V> OccupiedEntry<'a, K, V>

fn key(self: &Self) -> &K

Gets a reference to the key in the entry.

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

Gets a reference to the value in the entry.

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

Gets a mutable reference to the value in the entry.

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

Converts the entry into a mutable reference to its value.

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

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

fn remove(self: Self) -> V

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

impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>

impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>

impl<'a, K, V> Send for OccupiedEntry<'a, K, V>

impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>

impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V>

impl<'a, K, V> UnwindSafe for OccupiedEntry<'a, K, V>

impl<T> Any for OccupiedEntry<'a, K, V>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for OccupiedEntry<'a, K, V>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for OccupiedEntry<'a, K, V>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for OccupiedEntry<'a, K, V>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for OccupiedEntry<'a, K, V>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for OccupiedEntry<'a, K, V>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for OccupiedEntry<'a, K, V>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>