pub trait BodyExt: Body {
    type BytesFuture<'a>: Future<Output = Result<Bytes, Self::Error>>
       where Self: 'a;
    type ChunksFuture<'a>: Future<Output = Result<Chunks, Self::Error>>
       where Self: 'a;

    // Required methods
    fn bytes(&mut self) -> Self::BytesFuture<'_>;
    fn chunks(&mut self) -> Self::ChunksFuture<'_>;
}

Required Associated Types§

source

type BytesFuture<'a>: Future<Output = Result<Bytes, Self::Error>> where Self: 'a

source

type ChunksFuture<'a>: Future<Output = Result<Chunks, Self::Error>> where Self: 'a

Required Methods§

source

fn bytes(&mut self) -> Self::BytesFuture<'_>

Return continues memory

source

fn chunks(&mut self) -> Self::ChunksFuture<'_>

Return bytes array

Implementors§

source§

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

§

type BytesFuture<'a> = impl Future<Output = Result<Bytes, <T as Body>::Error>> + 'a where Self: 'a

§

type ChunksFuture<'a> = impl Future<Output = Result<SmallVec<[Bytes; 16]>, <T as Body>::Error>> + 'a where Self: 'a