Closed frederikhors closed 1 year ago
Hi @frederikhors, I'd suggest using tokio::fs::file to open the file, and pass it in. Apologies for the trouble, docs have rotted a bit since 0.32, this used to be much better documented
I'm not opening a file...
I'm not opening a file...
Sorry got confused, when I saw the method name up there, get_object_stream
will return a ResponseDataStream, ResponseDataStream
in turn has the bytes method which returns a &mut Pin<Box<dyn Stream<Item = Bytes>>>
, that might get you closer to what you need
We have chosen to use other methods. Thank anyway.
I'm having really hard time both with 0.32 and 0.33 beta when I need to get an
tokio::io::AsyncRead + Send
type in return.I found out this extremely useful doc to convert tokio <-> futures: https://github.com/benkay86/async-applied/blob/master/reqwest-tokio-compat/src/main.rs but I cannot apply it here.
I'm using the code below:
but it errors with:
Can you help me fix this, please?