pub struct HashVec<K: Eq + Hash, V> { /* private fields */ }

Implementations

Creates a new, empty map.

Creates a new, empty hashvec with the specified capacity.

Returns the number of elements the hashvec can hold without reallocating.

Returns true if the hashvec contains no elements.

Clears the hashvec, removing all entries.

Keep in mind this will not reallocate memory.

Inserts an entry into the hashvec, or replaces an existing one

Returns a reference to the value corresponding to the key, if it exists.

Returns a mutable reference to the value corresponding to the key, if it exists.

source

pub fn remove_entry(&mut self, k: K) -> Option<(K, V)>

Removes a key from the hashvec, returning the stored key and value if the key was previously in the hashvec.

Returns the index of the provided key, if the key exists.

Removes a key from the hashvec, returning the stored value if the key was previously in the hashvec.

Trait Implementations

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

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