pub trait BodySource:
AsyncRead
+ Send
+ 'static {
// Required method
fn trailers(self: Pin<&mut Self>) -> Option<Headers>;
}Expand description
Streaming body source that can optionally produce trailers.
Implement this on types that compute trailer headers dynamically as the body
is read — for example, a hashing wrapper that produces a Digest trailer
after all bytes have been streamed. For plain AsyncRead sources with no
trailers, Body::new_streaming is simpler.