Transforms a std::io::Read into a fallable futures::stream::Stream that yields Result<Vec<u8>, std::io::Error>
.
Under the hood, it reads from the file in chunks of up to buffer_size
on a Tokio blocking thread using spawn_blocking. A Handle to the Tokio runtime must be provided.
Add the library as a dependency:
bash
cargo add tokio-sync-read-stream
Sample Rust code:
```rust use std::io::File; use tokiosyncread_stream::SyncReadStream;
async fn main() {
let file = File::open("data.bin").unwrap();
let stream: SyncReadStream