Module map

Source

Re-exportsΒ§

pub use self::as_header_name::AsHeaderName;
pub use self::into_header_name::IntoHeaderName;

ModulesΒ§

as_header_name πŸ”’
into_header_name πŸ”’

MacrosΒ§

insert_phase_one πŸ”’
probe_loop πŸ”’

StructsΒ§

Bucket πŸ”’
Stores the data associated with a HeaderMap entry. Only the first value is included in this struct. If a header name has more than one associated value, all extra values are stored in the extra_values vector. A doubly linked list of entries is maintained. The doubly linked list is used so that removing a value is constant time. This also has the nice property of enabling double ended iteration.
Drain
A drain iterator for HeaderMap.
ExtraValue πŸ”’
Node in doubly-linked list of header value entries
GetAll
A view to all values stored in a single entry.
HashValue πŸ”’
Hash values are limited to u16 as well. While fast_hash and Hasher return usize hash codes, limiting the effective hash code to the lower 16 bits is fine since we know that the indices vector will never grow beyond that size.
HeaderMap
A set of HTTP headers
IntoIter
An owning iterator over the entries of a HeaderMap.
Iter
HeaderMap entry iterator.
IterMut
HeaderMap mutable entry iterator
Keys
An iterator over HeaderMap keys.
Links πŸ”’
The head and tail of the value linked list.
MaxSizeReached
Error returned when max capacity of HeaderMap is exceeded
OccupiedEntry
A view into a single occupied location in a HeaderMap.
Pos πŸ”’
An entry in the hash table. This represents the full hash code for an entry as well as the position of the entry in the entries vector.
RawLinks πŸ”’
Access to the links value in a slice of buckets.
VacantEntry
A view into a single empty location in a HeaderMap.
ValueDrain
An drain iterator of all values associated with a single header name.
ValueIter
An iterator of all values associated with a single header name.
ValueIterMut
A mutable iterator of all values associated with a single header name.
Values
HeaderMap value iterator.
ValuesMut
HeaderMap mutable value iterator

EnumsΒ§

Cursor πŸ”’
Tracks the value iterator state
Danger πŸ”’
Tracks the header map danger level! This relates to the adaptive hashing algorithm. A HeaderMap starts in the β€œgreen” state, when a large number of collisions are detected, it transitions to the yellow state. At this point, the header map will either grow and switch back to the green state OR it will transition to the red state.
Entry
A view into a single location in a HeaderMap, which may be vacant or occupied.
Link πŸ”’
A header value node is either linked to another node in the extra_values list or it points to an entry in entries. The entry in entries is the start of the list and holds the associated header name.

ConstantsΒ§

DISPLACEMENT_THRESHOLD πŸ”’
FORWARD_SHIFT_THRESHOLD πŸ”’
LOAD_FACTOR_THRESHOLD πŸ”’
MAX_SIZE πŸ”’
This limit falls out from above.

FunctionsΒ§

append_value πŸ”’
desired_pos πŸ”’
do_insert_phase_two πŸ”’
phase 2 is post-insert where we forward-shift Pos in the indices.
drain_all_extra_values πŸ”’
hash_elem_using πŸ”’
probe_distance πŸ”’
The number of steps that current is forward of the desired position for hash
remove_extra_value πŸ”’
Removes the ExtraValue at the given index.
to_raw_capacity πŸ”’
usable_capacity πŸ”’

Type AliasesΒ§

Size πŸ”’
Type used for representing the size of a HeaderMap value.