Module hash

Source
Expand description

Hash table layer

This uses the minimal utilities in crate::bucket_array::mem to build a slightly higher level data structure that’s meant to be used as a hash table for uniformly distributed keys. The single and paired bucket arrays from crate::bucket_array::mem are wrapped into concrete value-only and key-value hash table stores, and unified again via common traits.

This introduces new data types and conversions that let us represent one item key in multiple formats: the full size key, its implied bucket number, the remaining unused key bits, and a packed version of that remainder.

Structs§

KeyValueBucketArray 🔒
Concrete bucket array with parallel BucketArrayMemory for key and value storage
ValueBucketArray 🔒
Concrete bucket array with a single BucketArrayMemory for value storage

Traits§

Count 🔒
Trait for types that can be used as a count of items in a bucket
Insert 🔒
Trait for writing new key/value pairs to a bucket array
Key 🔒
Types we can use as full width keys
KeyLookup 🔒
Trait for bucket arrays that include storage for keys
KeyStorage 🔒
Backing storage for a specific key type
Shape 🔒
Trait for accessing the overall shape of a bucket array
ValueLookup 🔒
Trait for bucket arrays that include storage for values