pub struct OccupiedEntry<'a, K: 'a, V: 'a> { /* private fields */ }Expand description
A view into an occupied entry in a TransientMap.
Implementations§
Source§impl<'a, K: 'a, V: 'a> OccupiedEntry<'a, K, V>
impl<'a, K: 'a, V: 'a> OccupiedEntry<'a, K, V>
Sourcepub fn get_silent(&self) -> &V
pub fn get_silent(&self) -> &V
Gets a reference to the value in the entry. This accesses the value silently, meaning that nothing is marked as used.
Sourcepub fn insert(&mut self, value: V) -> V
pub fn insert(&mut self, value: V) -> V
Sets the value of the entry, and returns the entry’s old value.
Sourcepub fn insert_unused(&mut self, value: V) -> V
pub fn insert_unused(&mut self, value: V) -> V
Sets the value of the entry, and returns the entry’s old value. The inserted value is initially considered unused.
Sourcepub fn into_mut(self) -> &'a mut V
pub fn into_mut(self) -> &'a mut V
Converts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the map itself.
Sourcepub fn key_silent(&self) -> &K
pub fn key_silent(&self) -> &K
Gets a reference to the key in the entry. This accesses the value silently, meaning that nothing is marked as used.
Sourcepub fn remove_entry(self) -> (K, V)
pub fn remove_entry(self) -> (K, V)
Take the ownership of the key and value from the map.
Trait Implementations§
impl<'a, K, V> Send for OccupiedEntry<'a, K, V>
impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>
Auto Trait Implementations§
impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>
impl<'a, K, V> !RefUnwindSafe 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>
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