logo
pub trait Body: Sealed + Send + Sync {
    type Data: Buf;
    type Error: Into<Box<dyn Error + Send + Sync>>;

    fn is_end_stream(&self) -> bool;
    fn poll_data(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Option<Result<Self::Data, Self::Error>>>; fn poll_trailers(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Result<Option<HeaderMap>, Self::Error>>; }
Expand description

A trait alias for http_body::Body.

Required Associated Types

The body data type.

The errors produced from the body.

Required Methods

Check if the stream is over or not.

Reference http_body::Body::is_end_stream.

Poll for more data from the body.

Reference http_body::Body::poll_data.

Poll for the trailing headers.

Reference http_body::Body::poll_trailers.

Implementors