Trait BodyExt

Source
pub trait BodyExt: Body {
    // Required methods
    fn bytes(self) -> impl Future<Output = Result<Bytes, Self::Error>>;
    fn chunks(self) -> impl Future<Output = Result<Chunks, Self::Error>>;
}

Required Methods§

Source

fn bytes(self) -> impl Future<Output = Result<Bytes, Self::Error>>

Consumes body and return continous memory

Source

fn chunks(self) -> impl Future<Output = Result<Chunks, Self::Error>>

Return bytes array

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> BodyExt for T
where T: Body<Data = Bytes>,