Trait HttpBody

Source
pub trait HttpBody: Body<Data = Bytes, Error = Error> + Send {
    // Provided method
    fn poll_next_data(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<Option<Result<Bytes>>> { ... }
}
Expand description

Represents the supported HTTP body trait from middleware integrations.

Provided Methods§

Source

fn poll_next_data( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Bytes>>>

Polls the next data frame as bytes.

Returns end of stream after all data frames, thereby ignoring trailers.

Implementors§

Source§

impl<B> HttpBody for Body<B>
where B: HttpBody + Send,