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

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

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.