Module body

Module body 

Source
Expand description

HTTP body types.

body types are generic over Stream trait and mutation of body type must also implement said trait for being accepted as body type that xitca-http know of.

When implementing customized body type please reference none_body_hint and exact_body_hint for contract of inferring body size with Stream::size_hint trait method.

Structs§

BoxBody
type erased stream body.
Either
NoneBody
None body type. B type is used to infer other types of body’s output type used together with NoneBody.
Once
Full body type that can only be polled once with Stream::poll_next.
ResponseBody
A unified response body type. Generic type is for custom pinned response body(type implement Stream).

Enums§

BodySize
Body size hint.
RequestBody
A unified request body type for different http protocols. This enables one service type to handle multiple http protocols.

Constants§

NONE_BODY_HINT

Functions§

exact_body_hint
none_body_hint