Module body

Source
Expand description

Traits and structures to aid consuming and writing HTTP payloads.

“Body” and “payload” are used somewhat interchangeably in this documentation.

Structs§

BodyLimitExceeded
Error type returned from to_bytes_limited when body produced exceeds limit.
BodyStream
Streaming response wrapper.
BoxBody
A boxed message body with boxed errors.
None
Body type for responses that forbid payloads.
SizedStream
Known sized streaming response wrapper.

Enums§

BodySize
Body size hint.
EitherBody
An “either” type specialized for body types.

Traits§

MessageBody
An interface for types that can be used as a response body.

Functions§

to_bytes
Collects all the bytes produced by body.
to_bytes_limited
Collects the bytes produced by body, up to limit bytes.