Skip to main content

Crate h11r

Crate h11r 

Source
Expand description

Sans-I/O HTTP/1.1 connection engine.

Connection owns protocol state and buffering but performs no socket I/O. Pass received bytes to Connection::receive_data, poll Event values with Connection::next_event, and write bytes returned by its send methods.

Structs§

Connection
One Sans-I/O HTTP/1 connection.
Data
A piece of message body.
DataParts
Framing plus an unchanged caller-owned body object.
EndOfMessage
The end of one HTTP message, optionally carrying trailer fields.
InvalidLimits
A zero inbound limit is invalid.
InvalidMethod
An error returned when bytes are not a valid HTTP method token.
InvalidStatusCode
An error returned when an integer is outside the valid HTTP status range.
Limits
Independent resource limits applied to inbound field sections.
LocalProtocolError
The caller attempted an operation forbidden by the local state or framing.
Method
An HTTP request method token.
RemoteProtocolError
The peer sent malformed HTTP or exceeded an inbound limit.
Request
A request head.
Response
A final response head.
StatusCode
An HTTP status code in the protocol-valid range 100..=599.

Enums§

Event
A semantic event decoded from peer bytes.
NextEvent
Result of polling Connection::next_event.
Role
The client or server actor in an HTTP/1 exchange.
State
Observable lifecycle state of one HTTP/1 protocol actor.
Version
HTTP protocol version carried by a request or response head.

Type Aliases§

Header
One header field, preserving input order and name casing.
InformationalResponse
A non-final 1xx response head.