pub fn into_reader<S: BytesStream>(stream: S) -> IntoReader<S>
Expand description

Convert BytesStream into BytesRead.

Note

This conversion is zero cost.

Example

use opendal::io_util::into_reader;
let mut s = into_reader(stream);
let mut bs = Vec::new();
s.read_to_end(&mut bs).await;