mini_static/handler.rs
1use bytes::Bytes;
2
3/// The response body type used by mini-static.
4///
5/// This is a boxed HTTP body containing bytes. The error type is `StaticError` rather
6/// than `Infallible` because streamed file bodies can fail mid-stream (e.g. a disk read
7/// error after headers have already been sent) — that failure has to be representable
8/// by the body's `Error` type, not just by whatever produced the initial `Response`.
9pub type ResponseBody = http_body_util::combinators::BoxBody<Bytes, crate::error::StaticError>;