Skip to main content

Crate blazingly_wire

Crate blazingly_wire 

Source
Expand description

Framework-independent HTTP/1 parsing and response framing.

This crate owns no socket runtime and has no dependency on Blazingly contracts, routing, execution, OpenAPI, or MCP. Adapters provide bytes and choose how reads, writes, scheduling, and application dispatch happen.

Structs§

ByteRange
Byte range referencing the caller-owned receive buffer.
ChunkDecoder
Incremental decoder for a chunked request body and optional trailers.
DecodedChunkedBody
Complete decoded chunked body and total consumed wire bytes.
HeaderPosition
Header name and value ranges in the caller-owned receive buffer.
HeaderPositions
Inline-first header positions parsed without copying header bytes.
Limits
Limits enforced while decoding one HTTP/1 request.
ParseError
Stable protocol rejection suitable for an adapter error response.
PreparedHeaders
Response headers validated and encoded once for reuse across responses.
RequestHead
Parsed request head borrowing all text through byte ranges.
StreamingChunkDecoder
Zero-aggregate incremental chunked decoder for streaming request bodies.

Enums§

BodyFraming
Request body framing selected from validated HTTP/1 headers.
Method
Standard HTTP methods accepted by the current parser.
StreamingChunk
One incremental event from StreamingChunkDecoder.

Constants§

DEFAULT_MAX_BODY_BYTES
DEFAULT_MAX_CHUNKS
DEFAULT_MAX_HEADERS
DEFAULT_MAX_HEADER_BYTES
LAST_CHUNK
MAX_HEADER_CAPACITY

Functions§

encode_chunk
Appends one HTTP/1 chunk frame to output.
encode_response_head
Encodes an HTTP/1 response head while filtering caller-supplied framing fields. The adapter remains responsible for writing buffered/streaming body bytes and chunk terminators.
encode_response_head_prepared
Encodes an HTTP/1 response head from pre-validated headers.
encode_upgrade_response
Encodes a 101 Switching Protocols response without HTTP body framing.
parse_request_head
Parses one complete HTTP/1 request head from the start of buffer.
reason_phrase