[][src]Module solicit::http

The module implements the framing layer of HTTP/2 and exposes an API for using it.

Modules

client

The module contains a number of reusable components for implementing the client side of an HTTP/2 connection.

connection

The module contains the implementation of an HTTP/2 connection.

frame

The module contains the implementation of HTTP/2 frames.

priority

The module exposes an API for defining data prioritization strategies.

server

The module contains a number of reusable components for implementing the server side of an HTTP/2 connection.

session

Defines the interface for the session-level management of HTTP/2 communication. This is effectively an API that allows hooking into an HTTP/2 connection in order to handle events arising on the connection.

transport

The module contains implementations of the transport layer functionality that HTTP/2 requires. It exposes APIs that allow the HTTP/2 connection to use the transport layer without requiring it to know which exact implementation they are using (e.g. a clear-text TCP connection, a TLS protected connection, or even a mock implementation).

Structs

ConnectionError

The struct represents a connection error arising on an HTTP/2 connection.

Header

Represents an HTTP/2 header. Allows both the name and the value to be either an owned or a borrowed byte sequence.

HeaderPart

A convenience struct representing a part of a header (either the name or the value) that can be either an owned or a borrowed byte sequence.

Request

A struct representing a full HTTP/2 request, along with the full body, as a sequence of bytes.

Response

A struct representing the full raw response received on an HTTP/2 connection.

WindowSize

The struct represents the size of a flow control window.

Enums

ErrorCode

The enum represents an error code that are used in RST_STREAM and GOAWAY frames. These are defined in Section 7 of the HTTP/2 spec.

HttpError

An enum representing errors that can arise when performing operations involving an HTTP/2 connection.

HttpScheme

An enum representing the two possible HTTP schemes.

Constants

ALPN_PROTOCOLS

A set of protocol names that the library should use to indicate that HTTP/2 is supported during protocol negotiation (NPN or ALPN). We include some of the drafts' protocol names, since there is basically no difference for all intents and purposes (and some servers out there still only officially advertise draft support). TODO: Eventually only use "h2".

INITIAL_CONNECTION_WINDOW_SIZE

The initial size of the connections' flow control window.

Type Definitions

HttpResult

A convenience Result type that has the HttpError type as the error type and a generic Ok result type.

OwnedHeader

An alias for the type that represents an HTTP/2 header where both the name and the value is owned.

StaticHeader

A type alias for a Header where both the name, as well as the value must have a 'static lifetime if it is borrowed. Owned parts are allowed.

StaticResponse

A type alias for a Response where all headers' names and values must have a 'static lifetime if they are borrowed. This means that the parts can also be owned.

StreamId

An alias for the type that represents the ID of an HTTP/2 stream