pub struct VacantEntry<'s, T: 'static, C: Config> { /* private fields */ }Expand description
A handle to a vacant entry in an IDR.
It allows constructing values with the key that they will be assigned to.
See Idr::vacant_entry() for more details.
Implementations§
Source§impl<'s, T: 'static, C: Config> VacantEntry<'s, T, C>
impl<'s, T: 'static, C: Config> VacantEntry<'s, T, C>
Sourcepub fn key(&self) -> Key
pub fn key(&self) -> Key
Returns the key at which this entry will be inserted.
An entry stored in this entry will be associated with this key.
Sourcepub fn insert(self, value: T)
pub fn insert(self, value: T)
Inserts a value in the IDR.
This method is wait-free.
To get the key at which this value will be inserted, use
VacantEntry::key() prior to calling this method.
Trait Implementations§
Source§impl<T, C: Config> Debug for VacantEntry<'_, T, C>
impl<T, C: Config> Debug for VacantEntry<'_, T, C>
Auto Trait Implementations§
impl<'s, T, C> Freeze for VacantEntry<'s, T, C>
impl<'s, T, C> RefUnwindSafe for VacantEntry<'s, T, C>where
C: RefUnwindSafe,
impl<'s, T, C> Send for VacantEntry<'s, T, C>
impl<'s, T, C> Sync for VacantEntry<'s, T, C>
impl<'s, T, C> Unpin for VacantEntry<'s, T, C>
impl<'s, T, C> UnwindSafe for VacantEntry<'s, T, C>where
C: RefUnwindSafe,
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