Crate icaparse

Source
Expand description

§icaparse

A push library for parsing ICAP/1.0 requests and responses.

The focus is on speed and safety. Unsafe code is used to keep parsing fast, but unsafety is contained in a submodule, with invariants enforced. The parsing internals use an Iterator instead of direct indexing, while skipping bounds checks.

This parser is based heavily on the httparse HTTP parsing library.

Structs§

EncapsulationSection
Describes a section of the encapsulated data as listed in the Encapsulated header
Header
Represents a parsed header.
InvalidChunkSize
An error in parsing a chunk size.
Request
A parsed Request.
Response
A parsed Response.

Enums§

Error
An error in parsing.
SectionType
Possible sections of the encapsulated icap data
Status
The result of a successful parse pass.

Constants§

EMPTY_HEADER
An empty header, useful for constructing a Header array to pass in for parsing.

Functions§

parse_chunk_size
Parse a buffer of bytes as a chunk size.
parse_headers
Parse a buffer of bytes as headers.

Type Aliases§

Result
A Result of any parsing action.