pub struct OccupiedEntry<'a, K: 'a, V: 'a + WeakElement> { /* private fields */ }
Expand description

An occupied entry, which can be removed or viewed.

Implementations

Gets a reference to the key held by the entry.

O(1) time

source

pub fn remove_entry(self) -> (K, V::Strong)

Takes ownership of the key and value from the map.

expected O(1) time; worst-case O(p) time

Gets a reference to the value in the entry.

O(1) time

Gets a copy of the strong value reference stored in the entry.

O(1) time

Replaces the value in the entry with the given value, returning the old value.

O(1) time

Removes the entry, returning the value.

expected O(1) time; worst-case O(p) 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.