pub struct RawOccupiedEntryMut<'a, K, V> { /* private fields */ }Expand description
Handle to an existing entry, returned by RawEntryMut::Occupied.
use kevy_map::{KevyMap, RawEntryMut};
let mut m: KevyMap<u64, &str> = KevyMap::new();
m.insert(1, "one");
let RawEntryMut::Occupied(e) = m.raw_entry_mut(&1) else { panic!() };
assert_eq!((*e.key(), *e.get()), (1, "one"));
assert_eq!(e.remove(), "one");
assert_eq!(m.get(&1), None);Implementations§
Source§impl<'a, K, V> RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> RawOccupiedEntryMut<'a, K, V>
Sourcepub fn get_mut(&mut self) -> &mut V
pub fn get_mut(&mut self) -> &mut V
Mutable access to the stored value (borrow tied to &mut self).
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V> !UnwindSafe for RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> Freeze for RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> RefUnwindSafe for RawOccupiedEntryMut<'a, K, V>where
&'a mut KevyMap<K, V>: RefUnwindSafe,
impl<'a, K, V> Send for RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> Sync for RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> Unpin for RawOccupiedEntryMut<'a, K, V>
impl<'a, K, V> UnsafeUnpin for RawOccupiedEntryMut<'a, K, V>where
&'a mut KevyMap<K, V>: UnsafeUnpin,
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