pub fn into_sink<W: BytesWrite>(w: W) -> IntoSink<W>
Expand description

Convert BytesWrite into BytesSink.

Note

This conversion is zero cost.

Example

use opendal::io_util::into_sink;

let mut s = into_sink(Vec::new());
s.feed(Bytes::from(vec![0; 1024])).await?;
s.close().await?;