Trait nahpack::HpackEncodable
[−]
[src]
pub trait HpackEncodable { fn name(&self) -> &[u8]; fn value(&self) -> &[u8]; fn is_compressable(&self) -> bool; fn size(&self) -> u32 { ... } }
HpackEncodable is the interface which headers decoded by decode_block
adhere to, and headers to be encoded by encode_block
must adhere to.
Required Methods
fn name(&self) -> &[u8]
Bytes of the header's name. No validation has been performed.
fn value(&self) -> &[u8]
Bytes of the header's value. No validation has been performed.
fn is_compressable(&self) -> bool
For headers containing information that must remain private (e.g.,
Authorization
), both compression and entry to the dynamic table,
which is potentially shared, can be disabled. Headers that return
false
here are encoded as never-indexed literals.
Provided Methods
fn size(&self) -> u32
Calculates the HPACK-defined size of this header, which includes a specified amount of overhead. This affects the capacity remaining in dynamic tables. It does not indicate the object's size in memory.