#[repr(transparent)]
pub struct RefKindMap<'a, K, V, S = RandomState> where
    V: ?Sized + 'a, 
{ /* private fields */ }
Expand description

Hash map for different kinds of reference.

This type provides methods for retrieving references (either immutable or mutable) by moving them out of the map to preserve specified lifetime of the owner.

Implementations

Returns an immutable reference of the value without preserving lifetime of the owner.

Panics

Panics if mutable reference of the value was already moved out of the map.

Returns a mutable reference of the value without preserving lifetime of the owner.

Panics

Panics if mutable reference of the value was already moved out of the map or the value was already borrowed as immutable.

Moves an immutable reference of the value out of this map.

This function copies an immutable reference or replaces mutable reference with immutable one, preserving an immutable reference in this map.

Panics

Panics if mutable reference of the value was already moved out of the map.

Moves a mutable reference of the value out of this map.

Panics

Panics if mutable reference of the value was already moved out of the map or the value was already borrowed as immutable.

Trait Implementations

Constructs an empty map, with the Default value for the hasher.

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Creates a value from an iterator. Read more

Creates a value from an iterator. 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.