type Size = u16;
Expand description
Type used for representing the size of a HeaderMap value.
32,768 is more than enough entries for a single header map. Setting this
limit enables using u16
to represent all offsets, which takes 2 bytes
instead of 8 on 64 bit processors.
Setting this limit is especially beneficial for indices
, making it more
cache friendly. More hash codes can fit in a cache line.
You may notice that u16
may represent more than 32,768 values. This is
true, but 32,768 should be plenty and it allows us to reserve the top bit
for future usage.
Trait Implementations§
source§impl From<StatusCode> for u16
impl From<StatusCode> for u16
source§fn from(status: StatusCode) -> u16
fn from(status: StatusCode) -> u16
Converts to this type from the input type.
source§impl<T> PartialEq<Port<T>> for u16
impl<T> PartialEq<Port<T>> for u16
source§impl PartialEq<StatusCode> for u16
impl PartialEq<StatusCode> for u16
source§fn eq(&self, other: &StatusCode) -> bool
fn eq(&self, other: &StatusCode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.