Eventually I will need a ByteStream
for rusoto. So I thought I can create it from a futures::Stream
:
pub fn z_stream(r: impl Read) -> Result<ByteStream> {
let outstream = stream::empty();
// TODO, how do I wrap outstream
process(r, &mut wrapped_outstream)?;
Ok(ByteStream::new(outstream))
}
I have a method process
that takes 2 parameters, one for impl Read
, the other for impl Write
, where Read and Write come from std::io
.
How do I wrap the outstream
above into something that allows me to pass it to process
? There's probably something already out there and I don't have to write my own wrapper?