Module raw

Module raw 

Source

StructsΒ§

Bucket πŸ”’
A reference to a hash table bucket containing a T.
FullBucketsIndices πŸ”’
Iterator which returns an index of every full bucket in the table.
ProbeSeq πŸ”’
Probe sequence based on triangular numbers, which is guaranteed (since our table size is a power of two) to visit every group of elements exactly once.
RawDrain πŸ”’
Iterator which consumes elements without freeing the table storage.
RawExtractIf πŸ”’
RawIntoIter πŸ”’
Iterator which consumes a table and returns elements.
RawIter πŸ”’
Iterator which returns a raw pointer to every full bucket in the table.
RawIterHash πŸ”’
Iterator over occupied buckets that could match a given hash.
RawIterHashIndices πŸ”’
RawIterRange πŸ”’
Iterator over a sub-range of a table. Unlike RawIter this iterator does not track an item count.
RawTable πŸ”’
A raw hash table with an unsafe API.
RawTableInner πŸ”’
Non-generic part of RawTable which allows functions to be instantiated only once regardless of how many different key-value types are used.
TableLayout πŸ”’
Helper which allows the max calculation for ctrl_align to be statically computed for each T while keeping the rest of calculate_layout_for independent of T

EnumsΒ§

Fallibility πŸ”’
Whether memory allocation errors should return an error or abort.

TraitsΒ§

RawTableClone πŸ”’
Specialization of clone_from for Copy types
SizedTypeProperties πŸ”’

FunctionsΒ§

bucket_mask_to_capacity πŸ”’
Returns the maximum effective capacity for the given bucket mask, taking the maximum load factor into account.
capacity_to_buckets πŸ”’
Returns the number of buckets needed to hold the given number of items, taking the maximum load factor into account.
ensure_bucket_bytes_at_least_ctrl_align πŸ”’
h1 πŸ”’
Primary hash function, used to select the initial bucket to probe from.
maximum_buckets_in πŸ”’
Finds the largest number of buckets that can fit in allocation_size provided the given TableLayout.
offset_from πŸ”’ ⚠
prev_pow2 πŸ”’
Find the previous power of 2. If it’s already a power of 2, it’s unchanged. Passing zero is undefined behavior.