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

Bytes of the header's name. No validation has been performed.

Bytes of the header's value. No validation has been performed.

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

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.

Implementors