Struct OccupiedEntry

pub struct OccupiedEntry<'a, K, V> { /* private fields */ }

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

Implementations

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

fn key(&self) -> &K

Gets a reference to the key in the entry.

fn get(&self) -> &V

Gets a reference to the value in the entry.

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

Gets a mutable reference to the value in the entry.

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

Converts the entry into a mutable reference to its value.

fn insert(&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) -> V

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

Auto Trait Implementations

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

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

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

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

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

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

impl<'a, K, V> UnsafeUnpin for OccupiedEntry<'a, K, V> where OccupiedEntry<'a, K, V>: UnsafeUnpin,

Blanket Implementations

impl<T> Any for OccupiedEntry<'a, K, V> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for OccupiedEntry<'a, K, V> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for OccupiedEntry<'a, K, V> where T: ?Sized,

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

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

fn from(t: T) -> T

Returns the argument unchanged.

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

fn into(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<U> for OccupiedEntry<'a, K, V> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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