tokio-timer
tokio-timer copied to clipboard
Consider adding extension traits for ergonomics
Instead of e.g.
let consumer = timer
.timeout_stream(socket, Duration::from_secs(2))
.filter(|&v| v == 2)
I think that preserving the chaining of the future or stream would look better:
let consumer = socket
.timeout(&timer, Duration::from_secs(2))
.filter(|&v| v == 2)
Note that this allows dropping the _stream from the name.