Struct std::collections::hash_map::raw_table::EmptyBucket [] [src]

pub struct EmptyBucket<K, V, M> {
    raw: RawBucket<K, V>,
    idx: usize,
    table: M,
}

Fields

raw
idx
table

Methods

impl<K, V, M> EmptyBucket<K, V, M>

fn table(&self) -> &M

Borrow a reference to the table.

fn into_table(self) -> M

Move out the reference to the table.

impl<K, V, M: Deref<Target=RawTable<K, V>>> EmptyBucket<K, V, M>

fn next(self) -> Bucket<K, V, M>

fn into_bucket(self) -> Bucket<K, V, M>

fn gap_peek(self) -> Option<GapThenFull<K, V, M>>

impl<K, V, M: Deref<Target=RawTable<K, V>> + DerefMut> EmptyBucket<K, V, M>

fn put(self, hash: SafeHash, key: K, value: V) -> FullBucket<K, V, M>

Puts given key and value pair, along with the key's hash, into this bucket in the hashtable. Note how self is 'moved' into this function, because this slot will no longer be empty when we return! A FullBucket is returned for later use, pointing to the newly-filled slot in the hashtable.

Use make_hash to construct a SafeHash to pass to this function.