Module xitca_http::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
- type erased stream body.
- None body type. B type is used to infer other types of body’s output type used together with NoneBody.
- Full body type that can only be polled once with Stream::poll_next.
Enums
- Body size hint.
- A unified request body type for different http protocols. This enables one service type to handle multiple http protocols.
- A unified response body type. Generic type is for custom pinned response body(type implement Stream).