Struct weak_table::weak_key_hash_map::OccupiedEntry[][src]

pub struct OccupiedEntry<'a, K: 'a + WeakKey, V: 'a>(_);
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

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

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 mutable reference to the value in the entry.

O(1) time

Turns the entry into a mutable reference to the value borrowed from the map.

O(1) time

Replaces the value in the entry with the given 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

Performs the conversion.

Performs the conversion.

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.