Struct http_box::http1::Parser [] [src]

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

HTTP 1.x parser.

Methods

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

Create a new Parser and initialize it for head parsing.

Initialize this Parser for chunked transfer encoding parsing.

Initialize this Parser for head parsing.

Initialize this Parser for multipart parsing.

Initialize this Parser for URL encoded parsing.

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.

After each call to reset(), don't forget to also set the multipart boundary, or URL encoded data length using set_boundary() or set_length().

Resume parsing an additional slice of data.

Arguments

handler

The handler implementation.

stream

The stream of data to be parsed.

Set the multipart boundary.

Set the URL encoded length.

Retrieve the current state.