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) -> &KGets a reference to the key in the entry.
fn get(&self) -> &VGets a reference to the value in the entry.
fn get_mut(&mut self) -> &mut VGets a mutable reference to the value in the entry.
fn into_mut(self) -> &'a mut VConverts the entry into a mutable reference to its value.
fn insert(&mut self, value: V) -> VSets the value of the entry with the
OccupiedEntry's key, and returns the entry's old value.fn remove(self) -> VTakes 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) -> TReturns the argument unchanged.
impl<T, U> Into<U> for OccupiedEntry<'a, K, V>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>