Struct h2::frame::headers::HeaderBlock
source · struct HeaderBlock {
fields: HeaderMap,
field_size: usize,
is_over_size: bool,
pseudo: Pseudo,
}
Fields§
§fields: HeaderMap
The decoded header fields
field_size: usize
Precomputed size of all of our header fields, for perf reasons
is_over_size: bool
Set to true if decoding went over the max header list size.
pseudo: Pseudo
Pseudo headers, these are broken out as they must be sent as part of the headers frame.
Implementations§
source§impl HeaderBlock
impl HeaderBlock
fn load( &mut self, src: &mut BytesMut, max_header_list_size: usize, decoder: &mut Decoder, ) -> Result<(), Error>
fn into_encoding(self, encoder: &mut Encoder) -> EncodingHeaderBlock
sourcefn calculate_header_list_size(&self) -> usize
fn calculate_header_list_size(&self) -> usize
Calculates the size of the currently decoded header list.
According to http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE
The value is based on the uncompressed size of header fields, including the length of the name and value in octets plus an overhead of 32 octets for each header field.
Trait Implementations§
source§impl Debug for HeaderBlock
impl Debug for HeaderBlock
source§impl PartialEq for HeaderBlock
impl PartialEq for HeaderBlock
source§fn eq(&self, other: &HeaderBlock) -> bool
fn eq(&self, other: &HeaderBlock) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HeaderBlock
impl StructuralPartialEq for HeaderBlock
Auto Trait Implementations§
impl !Freeze for HeaderBlock
impl RefUnwindSafe for HeaderBlock
impl Send for HeaderBlock
impl Sync for HeaderBlock
impl Unpin for HeaderBlock
impl UnwindSafe for HeaderBlock
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.