pub async fn copy_stream_to_async_write<S, W>(
    stream: S,
    writer: &mut W
) -> Result<()> where
    S: BytesStream + Unpin,
    W: AsyncWrite + Unpin
Expand description

Copies Bytes from a BytesStream to an AsyncWrite implementor.

Consuming the BytesStream since it won’t have any Bytes left.