Struct compact::CHashMap[][src]

pub struct CHashMap<K, V, A: Allocator = DefaultHeap> { /* fields omitted */ }

A dynamically-sized open adressing quadratic probing hashmap that can be stored in compact sequential storage and automatically spills over into free heap storage using Allocator.

Methods

impl<K: Copy + Eq + Hash, V: Compact, A: Allocator> OpenAddressingMap<K, V, A>
[src]

constructor

constructor

Amount of entries in the dictionary

Is the dictionary empty?

Look up the value for key query, if it exists

get mutable

Does the dictionary contain a value for query?

Insert new value at key query and return the previous value at that key, if any existed

Remove value at key query and return it, if it existed

Iterator over all keys in the dictionary

Iterator over all values in the dictionary

Iterator over mutable references to all values in the dictionary

Iterator over all key-value pairs in the dictionary

Iterator over all key-value pairs in the dictionary, with the value as a mutable reference

impl<K: Hash + Eq + Copy, I: Compact, A1: Allocator, A2: Allocator> OpenAddressingMap<K, CompactVec<I, A1>, A2>
[src]

Push a value onto the CompactVec at the key query

Iterator over the CompactVec at the key query

Remove the CompactVec at the key query and iterate over its elements (if it existed)

Trait Implementations

impl<K: Copy + Eq + Hash, V: Compact, A: Allocator> Compact for OpenAddressingMap<K, V, A>
[src]

Is the object's dynamic part stored compactly?

Size of the dynamic part in bytes

Copy the static part of source to dest and compactly store the dynamic part of source as the new dynamic part of dest at new_dynamic_part. This semantically moves source into dest. Read more

Creates a clone of self with the dynamic part guaranteed to be stored freely. Read more

Total size of the object (static part + dynamic part)

Get a pointer to behind the static part of self (commonly used place for the dynamic part)

Like compact with new_dynamic_part set to dest.behind()

impl<K: Copy, V: Compact + Clone, A: Allocator> Clone for OpenAddressingMap<K, V, A>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<K: Copy + Eq + Hash, V: Compact, A: Allocator> Default for OpenAddressingMap<K, V, A>
[src]

Returns the "default value" for a type. Read more

impl<K: Copy + Eq + Hash, V: Compact + Clone, A: Allocator> FromIterator<(K, V)> for OpenAddressingMap<K, V, A>
[src]

Construct a compact dictionary from an interator over key-value pairs

impl<K: Copy + Eq + Hash + Debug, V: Compact + Clone + Debug, A: Allocator> Debug for OpenAddressingMap<K, V, A>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<K, V, A = DefaultHeap> !Send for CHashMap<K, V, A>

impl<K, V, A = DefaultHeap> !Sync for CHashMap<K, V, A>