pub struct VacantEntry<'a, K: 'a, V: 'a> { /* private fields */ }Expand description
A view into a vacant entry in a TransientMap.
Implementations§
Source§impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V>
impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V>
Sourcepub fn insert(self, value: V) -> &'a mut V
pub fn insert(self, value: V) -> &'a mut V
Sets the value of the entry with the VacantEntry’s key, and returns a mutable reference to it.
Sourcepub fn insert_unused(self, value: V) -> &'a mut V
pub fn insert_unused(self, value: V) -> &'a mut V
Sets the value of the entry with the VacantEntry’s key, and returns a mutable reference to it.
The inserted value is initially considered unused.
Sourcepub fn key_silent(&self) -> &K
pub fn key_silent(&self) -> &K
Gets a reference to the key that would be used when inserting a value through the VacantEntry.
Trait Implementations§
impl<'a, K, V> Send for VacantEntry<'a, K, V>
impl<'a, K, V> Sync for VacantEntry<'a, K, V>
Auto Trait Implementations§
impl<'a, K, V> Freeze for VacantEntry<'a, K, V>
impl<'a, K, V> !RefUnwindSafe for VacantEntry<'a, K, V>
impl<'a, K, V> Unpin for VacantEntry<'a, K, V>
impl<'a, K, V> !UnwindSafe for VacantEntry<'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