Struct wasmtime_environ::wasmparser::collections::map::OccupiedEntry
source · pub struct OccupiedEntry<'a, K, V> { /* private fields */ }
Implementations§
source§impl<'a, K, V> OccupiedEntry<'a, K, V>where
K: Ord + 'a,
V: 'a,
impl<'a, K, V> OccupiedEntry<'a, K, V>where
K: Ord + 'a,
V: 'a,
sourcepub fn insert(&mut self, value: V) -> V
pub 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.
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 remove_entry(self) -> (K, V)
pub fn remove_entry(self) -> (K, V)
Take ownership of the key and value from the Map
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>where
K: Freeze,
impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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>where
K: Unpin,
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