pub struct HashedLayer<K: HashOrdered, L> {
    pub keys: Vec<Entry<K>>,
    pub vals: L,
}
Expand description

A level of the trie, with keys and offsets into a lower layer.

If keys[i].1 == 0 then entry i should be ignored. This is our version of Option<(K, usize)>, which comes at the cost of requiring K: Default to populate empty keys.

Each region of this layer is an independent immutable RHH map, whose size should equal something like (1 << i) + i for some value of i. The first (1 << i) elements are where we expect to find keys, and the remaining i are for spill-over due to collisions near the end of the first region.

We might do something like “if X or fewer elements, just use an ordered list”.

Fields

keys: Vec<Entry<K>>

Keys and offsets for the keys.

vals: L

A lower layer containing ranges of values.

Trait Implementations

The type revealed by the cursor.
Reveals the current key.
Advances the cursor by one element.
Advances the cursor until the location where key would be expected.
Returns true if the cursor points at valid data. Returns false if the cursor is exhausted.
Rewinds the cursor to its initial state.
Repositions the cursor to a different range of values.
Formats the value using the given formatter. Read more
The type of item from which the type is constructed.
The type of cursor used to navigate the type.
The type used to merge instances of the type together.
The type used to assemble instances of the type from its Items.
The number of distinct keys, as distinct from the total number of tuples.
The total number of tuples in the collection.
Returns a cursor over a range of data, commonly used by others to restrict navigation to sub-collections. Read more
Returns a cursor capable of navigating the collection.
Merges two collections into a third. 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.