pub struct RawVacantEntryMut<'map, K, V, const N: usize, S>(/* private fields */);
Expand description
A view into a vacant entry in a HashMap
.
It is part of the RawEntryMut
enum.
Implementations§
Source§impl<'map, K, V, const N: usize, S> RawVacantEntryMut<'map, K, V, N, S>where
S: BuildHasher,
impl<'map, K, V, const N: usize, S> RawVacantEntryMut<'map, K, V, N, S>where
S: BuildHasher,
Sourcepub fn insert(self, key: K, value: V) -> (&'map mut K, &'map mut V)where
K: Hash,
S: BuildHasher,
pub fn insert(self, key: K, value: V) -> (&'map mut K, &'map mut V)where
K: Hash,
S: BuildHasher,
Sets the value of the entry with the VacantEntry
’s key,
and returns a mutable reference to it.
Sourcepub fn insert_hashed_nocheck(
self,
hash: u64,
key: K,
value: V,
) -> (&'map mut K, &'map mut V)where
K: Hash,
S: BuildHasher,
pub fn insert_hashed_nocheck(
self,
hash: u64,
key: K,
value: V,
) -> (&'map mut K, &'map mut V)where
K: Hash,
S: BuildHasher,
Sets the value of the entry with the VacantEntry
’s key,
and returns a mutable reference to it.
Sourcepub fn insert_with_hasher<H>(
self,
hash: u64,
key: K,
value: V,
hasher: H,
) -> (&'map mut K, &'map mut V)
pub fn insert_with_hasher<H>( self, hash: u64, key: K, value: V, hasher: H, ) -> (&'map mut K, &'map mut V)
Set the value of an entry with a custom hasher function.
Trait Implementations§
Source§impl<K, V, const N: usize, S> Debug for RawVacantEntryMut<'_, K, V, N, S>
impl<K, V, const N: usize, S> Debug for RawVacantEntryMut<'_, K, V, N, S>
Source§impl<'map, K, V, const N: usize, S> From<RawVacantEntryMut<'map, K, V, S>> for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> From<RawVacantEntryMut<'map, K, V, S>> for RawVacantEntryMut<'map, K, V, N, S>
Source§fn from(m: RawVacantEntryMut<'map, K, V, S>) -> Self
fn from(m: RawVacantEntryMut<'map, K, V, S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'map, K, V, const N: usize, S> Freeze for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> RefUnwindSafe for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> Send for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> Sync for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> Unpin for RawVacantEntryMut<'map, K, V, N, S>
impl<'map, K, V, const N: usize, S> !UnwindSafe for RawVacantEntryMut<'map, K, V, N, S>
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