Skip to main content

Module connection

Module connection 

Source
Expand description

HTTP messages, body representations, and independent WebSocket connections.

HTTP metadata stays outside the body even when the body has been decoded into a vendor’s JSON type. Multipart and event streams are HTTP bodies. A WebSocket handshake uses HTTP; the established socket has its own duplex interface and is never an HTTP body variant.

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Method
The Request Method (VERB)
Multipart
A decoded multipart body. Each part’s headers retain its content disposition (including field name and filename), content type, and extension headers.
MultipartPart
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
WebSocket
An established connection. Sending and receiving are independent; there is no request/response pairing. The HTTP handshake is represented separately by super::WireRequest and super::WireResponse.
WireRequest
An HTTP request with five elements.
WireResponse
An HTTP response with three elements, independent of the body representation.
WsClose

Enums§

HttpBody
An encoded HTTP body. Content type and encoding belong to the HTTP headers. Both JSON and multipart can arrive buffered or streamed.
StreamFraming
How records are delimited inside an HTTP stream, independently of the transport’s chunk boundaries and the vendor’s JSON schema.
WsFrame
A complete WebSocket data message or control frame. The transport adapter handles wire fragmentation, masking, and protocol validation.

Type Aliases§

ByteStream
Raw HTTP body chunks. A transport chunk need not align with a JSON value, UTF-8 character, SSE event, or multipart boundary.
PartStream
Parsed multipart parts, delivered in their original order. Repeated field names are retained rather than collapsed into a map.
TransportError
An error supplied by the transport adapter while receiving or sending data.
WsReceiver
WsSender