mongo-rust-driver icon indicating copy to clipboard operation
mongo-rust-driver copied to clipboard

RUST-1399 Implement `AsyncRead` for `GridFsDownloadStream`

Open isabelatkinson opened this issue 2 years ago • 0 comments

Implements the streaming API for GridFS downloads. Some relevant reading related to the async stuff going on here:

  • This forum thread which discusses caching futures.
  • tokio's implementation of the AsyncRead trait for File. This is tokio's AsyncRead rather than future's but demonstrates future caching and a similar state machine.

I'm going to add some unit tests to cover cases related to buffer size and reading into multiple buffers, but I wanted to request review on this now to get some feedback while I'm away.

isabelatkinson avatar Oct 12 '22 20:10 isabelatkinson