pub struct DummyHashMapOccupiedEntry<'c, K, V> { /* private fields */ }
Expand description
Occupied entry of a HashMap.
This entry can be used to read the key, mutate the value, or remove the key/value pair from the HashMap, without re-hashing.
Trait Implementations
sourceimpl<'c, K, V> EntryRemovableOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
impl<'c, K, V> EntryRemovableOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
type Vacant = DummyHashMapVacantEntry<'c, K, V>
fn recover_removed_entry(removed: Self::Removed) -> DummyHashMapEntry<'c, K, V>
sourceimpl<'c, K, V> KeyedOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
impl<'c, K, V> KeyedOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
type Key = K
type Key = K
the type of the keys in the collection
type BorrowedKey = &'c K
sourcefn get_pair<'e>(&'e self) -> (&'e Self::Key, &'e Self::Value) where
'c: 'e,
fn get_pair<'e>(&'e self) -> (&'e Self::Key, &'e Self::Value) where
'c: 'e,
get the key value pair, immutably borrowed
sourceimpl<'c, K, V> OccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
impl<'c, K, V> OccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
type Value = V
type Value = V
the type of the values in the collection
sourcefn get_value<'e>(&'e self) -> &'e Self::Value where
'c: 'e,
fn get_value<'e>(&'e self) -> &'e Self::Value where
'c: 'e,
get the value, immutably borrowed.
sourcefn get_value_mut<'e>(&'e mut self) -> &mut Self::Value where
'c: 'e,
fn get_value_mut<'e>(&'e mut self) -> &mut Self::Value where
'c: 'e,
get the value, mutably borrowed.
sourcefn into_value_mut<'e>(self) -> &'c mut Self::Value
fn into_value_mut<'e>(self) -> &'c mut Self::Value
convert the entry into a mutable to the value.
sourcefn replace_value<'e>(&'e mut self, value: Self::Value) -> Self::Value where
'c: 'e,
fn replace_value<'e>(&'e mut self, value: Self::Value) -> Self::Value where
'c: 'e,
replace the value in the entry, returning the old value.
sourceimpl<'c, K, V> RemovableOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
impl<'c, K, V> RemovableOccupiedEntry<'c> for DummyHashMapOccupiedEntry<'c, K, V>
type Removed = DummyHashMapVacantEntry<'c, K, V>
type Removed = DummyHashMapVacantEntry<'c, K, V>
The type returned when removing the OccupiedEntry
sourcefn remove(self) -> (V, Self::Removed)
fn remove(self) -> (V, Self::Removed)
remove this entry from the collection, converting the entry into a Self::Removed and returning the value that was there. Read more
sourcefn remove_value(self) -> Self::Value
fn remove_value(self) -> Self::Value
remove this entry from the collection, consuming the entry and returning the value that was there. Read more
Auto Trait Implementations
impl<'c, K, V> RefUnwindSafe for DummyHashMapOccupiedEntry<'c, K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'c, K, V> Send for DummyHashMapOccupiedEntry<'c, K, V> where
K: Send,
V: Send,
impl<'c, K, V> Sync for DummyHashMapOccupiedEntry<'c, K, V> where
K: Sync,
V: Sync,
impl<'c, K, V> Unpin for DummyHashMapOccupiedEntry<'c, K, V>
impl<'c, K, V> !UnwindSafe for DummyHashMapOccupiedEntry<'c, K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more