pub type Body = BoxBody<Bytes, Error>;Expand description
Unified response body type used throughout the server.
A type-erased boxed body backed by http_body_util::combinators::BoxBody
with bytes::Bytes data frames and io::Error errors.
This single type covers all body variants used by the server:
- Empty bodies (for HEAD responses, OPTIONS, redirects)
- In-memory byte buffers (for generated HTML, Prometheus metrics, health checks)
- File streams ([
crate::fs::stream::FileStream]) - Compressed streams (gzip/brotli/deflate/zstd encoders)
- In-memory cached file streams ([
crate::mem_cache::stream::MemCacheFileStream])
Aliased Typeยง
pub struct Body { /* private fields */ }