[][src]Function hyper::body::to_bytes

pub async fn to_bytes<T>(body: T) -> Result<Bytes, T::Error> where
    T: HttpBody

Concatenate the buffers from a body into a single Bytes asynchronously.

This may require copying the data into a single buffer. If you don't need a contiguous buffer, prefer the aggregate function.