Design review for futures-bufio


#1

Hi! I’ve written a small crate this past weekend, futures-bufio, and I’d like it to be generally usable and useful to more than just me.

This is my third iteration of this code - the first was an incredibly specific and bad implementation while learning futures and the second was also a bit specific and still a shoddy usage of futures. I wrote it the third time based off futures-await and then removed that dependency to allow this to be published as a crate (no github repo dependencies on crates, it seems).

I found that, with what I’m trying to do, I couldn’t make the API as clean as I wanted. I didn’t see an obvious nor intuitive way to implement the tokio-io’s AsyncRead trait, nor std::io’s Read trait, because I need to own structs for the duration of the futures.

If anybody has time to check it out and offer suggestions, this crate is useful to me and I’d like it to be more useful to others. Thanks!