Method lrs::hashmap::VacantEntry::set

Sets the content of the empty bucket.

Syntax

impl<'a, Key, Value, Bucket> VacantEntry<'a, Key, Value, Bucket>
    where Key: Eq<Key> + Hash,
          Bucket: Bucket<Key, Value>,
{
    fn set(self, key: Key, value: Value) -> OccupiedEntry<'a, Key, Value, Bucket>
}

Arguments

NameDescription
key

The key that will be inserted.

This key should hash to the same value as the key that was used to retrieve this entry. Otherwise it might not be possible to retrieve the stored value until the table is resized.

value

The value that will be inserted.