pub enum Entry<'a, K: 'a + WeakKey, V: 'a + WeakElement> {
    Occupied(OccupiedEntry<'a, K, V>),
    Vacant(VacantEntry<'a, K, V>),
}
Expand description

Represents an entry in the table which may be occupied or vacant.

Variants

Occupied(OccupiedEntry<'a, K, V>)

Vacant(VacantEntry<'a, K, V>)

Implementations

Ensures a value is in the entry by inserting a default value if empty, and returns a mutable reference to the value in the entry.

O(1) time

Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.

O(1) time

Returns a reference to this entry’s key.

O(1) time

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.