pub trait KeyedVacantEntry<'c>: VacantEntry<'c> {
    type Key: 'c;
    fn get_key<'e>(&'e self) -> &'e Self::Key
    where
        'c: 'e
;
fn into_key(self) -> Self::Key; }
Expand description

A vacant entry which has a key.

This is usually going to be created by some search by key, which was not present in the collection. When this occurs, the get_entry method should move the owned key into a vacant entry, or clone it.

this can be thought of as owning a K, ready to insert when given a corresponding value.

Associated Types

Required methods

Get a reference to the key an item will be inserted with.

Consume self and return the contained key.

Implementors