Expand description
Shared body type used throughout the server.
BoxBody is a type-erased HTTP body that supports both buffered and
streaming responses. Handlers return Response<BoxBody>.
Functions§
- body_
from_ bytes - Create a
BoxBodyfrom bytes. - body_
from_ stream - Create a streaming
BoxBodyfrom aStreamofResult<Frame<Bytes>, E>. - body_
from_ string - Create a
BoxBodyfrom a string. - empty_
body - Create an empty
BoxBody. - sse_
body - Create an SSE (Server-Sent Events) body from a stream of event strings.
Type Aliases§
- BoxBody
- The response body type used by typeway handlers.
- BoxBody
Error - Error type for the boxed body. Infallible for buffered bodies, but allows streaming bodies to report errors.