pub struct VacantEntry<'map, K, V, S = DefaultHashBuilder> { /* private fields */ }Expand description
A view into a vacant entry of the map
Implementations§
Source§impl<'map, K, V, S> VacantEntry<'map, K, V, S>
impl<'map, K, V, S> VacantEntry<'map, K, V, S>
Sourcepub fn insert(self, value: V) -> &'map mut V
pub fn insert(self, value: V) -> &'map mut V
Sets the value of the entry and return a mutable reference to it.
Sourcepub fn insert_entry(self, value: V) -> OccupiedEntry<'map, K, V, S>
pub fn insert_entry(self, value: V) -> OccupiedEntry<'map, K, V, S>
Set the value of the entry and return an OccupiedEntry.
Trait Implementations§
Auto Trait Implementations§
impl<'map, K, V, S = RandomState> !UnwindSafe for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> Freeze for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> RefUnwindSafe for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> Send for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> Sync for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> Unpin for VacantEntry<'map, K, V, S>
impl<'map, K, V, S> UnsafeUnpin for VacantEntry<'map, K, V, 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