pub fn vacant_entry(&self) -> Option<VacantEntry<'_, T, C>> {
        let (tid, shard) = self.shards.current();
        test_println!("vacant_entry {:?}", tid);
        shard.init_with(|idx, slot| {
            let inner = slot.init()?;
            let key = inner.generation().pack(tid.pack(idx));
            Some(VacantEntry {
                inner,
                key,
                _lt: PhantomData,
            })
        })
    }
/// Return a handle to a vacant entry allowing for further manipulation.
///
/// This function is useful when creating values that must contain their
/// slab index. The returned [`VacantEntry`] reserves a slot in the slab and
/// is able to return the index of the entry.
///
/// # Examples
///
/// ```
/// # use sharded_slab::Slab;
/// let mut slab = Slab::new();
///
/// let hello = {
///     let entry = slab.vacant_entry().unwrap();
///     let key = entry.key();
///
///     entry.insert((key, "hello"));
///     key
/// };
///
/// assert_eq!(hello, slab.get(hello).unwrap().0);
/// assert_eq!("hello", slab.get(hello).unwrap().1);
/// ```
Return a handle to a vacant entry allowing for further manipulation.
This function is useful when creating values that must contain their
slab index. The returned [`VacantEntry`] reserves a slot in the slab and
is able to return the index of the entry.
Return a handle to a vacant entry allowing for further manipulation . This function is useful when creating values that must contain their slab index . The returned [ ` VacantEntry ` ] reserves a slot in the slab and is able to return the index of the entry .
pub fn vacant_entry(&self) -> Option<VacantEntry<'_, T, C>> {
        let (tid, shard) = self.shards.current();
        test_println!("vacant_entry {:?}", tid);
        shard.init_with(|idx, slot| {
            let inner = slot.init()?;
            let key = inner.generation().pack(tid.pack(idx));
            Some(VacantEntry {
                inner,
                key,
                _lt: PhantomData,
            })
        })
    }
pub fn vacant_entry ( & self ) -> Option < VacantEntry < ' _ , T , C > > { let ( tid , shard ) = self . shards . current ( ) ; test_println ! ( " " tid ) ; shard . init_with ( | idx , slot | { let inner = slot . init ( ) ? ; let key = inner . generation ( ) . pack ( tid . pack ( idx ) ) ; Some ( VacantEntry { inner , key , _lt : PhantomData , } ) } ) }
Return a handle to a vacant entry allowing for further manipulation.
Return a handle to a vacant entry allowing for further manipulation .
&self
&self
examples
None
use sharded_slab::slab;
let mut slab = Slab::new().

let hello = {
let entry = slab.vacant_entry().unwrap();
let key = entry.key().

entry.insert((key, "hello"));
key
}.


let mut slab = Slab :: new () . let hello = { let entry = slab . vacant_entry () . unwrap () ; let key = entry . key () . entry . insert (( key " hello " )) ; key } .