pub enum RawEntryMut<'a, K, V> {
Occupied(RawOccupiedEntryMut<'a, K, V>),
Vacant(RawVacantEntryMut<'a, K, V>),
}Expand description
Result of KevyMap::raw_entry_mut.
Mirrors hashbrown::hash_map::RawEntryMut: an Occupied arm grants
read / mutate / consume access to the existing entry; a Vacant arm
can be filled with insert(k, v). The defining property — and the
reason this API exists distinct from get_mut — is that
RawOccupiedEntryMut::remove consumes self, which releases the
outstanding borrow on the map and lets the caller perform the
deletion within the same borrow scope.
Variants§
Occupied(RawOccupiedEntryMut<'a, K, V>)
The key was present; gives read / mutate / consume access.
Vacant(RawVacantEntryMut<'a, K, V>)
The key was absent; insert(k, v) writes a new entry.
Auto Trait Implementations§
impl<'a, K, V> !UnwindSafe for RawEntryMut<'a, K, V>
impl<'a, K, V> Freeze for RawEntryMut<'a, K, V>
impl<'a, K, V> RefUnwindSafe for RawEntryMut<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for RawEntryMut<'a, K, V>
impl<'a, K, V> Sync for RawEntryMut<'a, K, V>
impl<'a, K, V> Unpin for RawEntryMut<'a, K, V>
impl<'a, K, V> UnsafeUnpin for RawEntryMut<'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