Skip to main content

BodyExt

Trait BodyExt 

Source
pub trait BodyExt: Body {
    // Provided methods
    fn frame(&mut self) -> Frame<'_, Self> 
       where Self: Unpin { ... }
    fn collect(self) -> Collect<Self>
       where Self: Sized { ... }
}
Expand description

An extension trait for [http_body::Body] adding various combinators and adapters

Provided Methods§

Source

fn frame(&mut self) -> Frame<'_, Self>
where Self: Unpin,

Returns a future that resolves to the next Frame, if any.

Source

fn collect(self) -> Collect<Self>
where Self: Sized,

Turn this body into [Collected] body which will collect all the DATA frames and trailers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> BodyExt for T
where T: Body + ?Sized,