Struct http_box::http2::Parser [] [src]

pub struct Parser<'a, T: 'a + HttpHandler> { /* fields omitted */ }

HTTP 2.x parser.

Methods

impl<'a, T: 'a + HttpHandler> Parser<'a, T>
[src]

Create a new Parser.

Retrieve the total byte count processed since the instantiation of Parser.

The byte count is updated when resume() completes. This means that if a call to byte_count() is executed from within a callback, it will be accurate within stream.len() bytes. For precise accuracy, the best time to retrieve the byte count is outside of all callbacks.

Reset Parser to its initial state.

Resume parsing an additional slice of data.

Arguments

handler

The handler implementation.

stream

The stream of data to be parsed.

Retrieve the current state.