pub struct OccupiedEntry<'a, K, T> { /* private fields */ }
Expand description
A view into an occupied entry in a map. It is part of the Entry
enum.
Implementations§
Source§impl<'a, K: EntryKey, T> OccupiedEntry<'a, K, T>
impl<'a, K: EntryKey, T> OccupiedEntry<'a, K, T>
Sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Gets a mutable reference to the value in the entry.
If you need a reference to the OccupiedEntry
which may outlive the
destruction of the entry value, see OccupiedEntry::into_mut
.
Sourcepub fn into_mut(self) -> &'a mut T
pub 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.
If you need multiple references to the OccupiedEntry
, see
OccupiedEntry::get_mut
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, T> Freeze for OccupiedEntry<'a, K, T>where
K: Freeze,
impl<'a, K, T> RefUnwindSafe for OccupiedEntry<'a, K, T>where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, K, T> Send for OccupiedEntry<'a, K, T>
impl<'a, K, T> Sync for OccupiedEntry<'a, K, T>
impl<'a, K, T> Unpin for OccupiedEntry<'a, K, T>where
K: Unpin,
impl<'a, K, T> !UnwindSafe for OccupiedEntry<'a, K, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more