How to combine BufReader & BufWriter to make a buffered stream?


#1

The official docs talk about wrapping a tcp stream in a BufWriter to buffer writes. I’m trying to buffer both reads and writes, but I can’t figure out how to combine BufReader and BufWriter for use on the same underlying stream.

Surely there is a way?


#2

There is a bufstream crate that provides this.