Expand description
Bounded, runtime-neutral wire codecs.
These codecs only understand transport framing and JSON syntax. They do not decode vendor objects, perform conversion, or preserve unknown application fields as a common representation.
Structs§
- Codec
Error - A codec failure with an optional lower-level source.
- Codec
Limits - Explicit bounds required by every decoder and encoder.
- Json
Array Decoder - Parses array elements only once a delimiter establishes the token boundary. The retained buffer is one value, independent of transport chunk size.
- Json
Array Encoder - Json
Decoder - Multipart
Decoder - Each part owns a real field stream. Consume/drop it before next_part; dropping an unread field lets multer discard it under the same size limits. The caller driving next_part OR the returned body drives the original input. On wasm only the private queue is Send; the original stream stays !Send.
- Multipart
Encoder - Ndjson
Decoder - Accepts LF/CRLF and an optional final complete JSON line without LF.
- Ndjson
Encoder - SseDecoder
- Incremental LF/CRLF/CR framing. Invalid UTF-8 is rejected rather than
replaced.
finishrejects a pending data event instead of dispatching an event without its required blank-line delimiter. A final partial comment or field line is also rejected. No vendor lifecycle is inferred from EOF. - SseEncoder
- SseEvent
- Parsed SSE data event.
idandretryare effective connection settings, including values supplied in earlier control-only blocks.
Enums§
Functions§
- decode_
json - encode_
json - encode_
sse_ done - Literal marker bytes, not a complete streaming encoder; SseEncoder::done accounts this marker against the enclosing body limit.
- encode_
sse_ event - Encodes one event. Use SseEncoder for cumulative limits over a whole body.
- read_
http_ body - Consumes one HTTP body under an aggregate byte limit.
Type Aliases§
- Codec
Future - A boxed codec operation future. Native futures are
Send; wasm follows the connection stream contract and does not requireSend.