The stream and sink extension traits, impls and structs are very similar (to the point where one could easily combine them into one).
I've kept them separate though as otherwise one would always be forced to ratelimit both directions of a Stream+Sink object and there would be no way to limit just the Stream part while letting the Sink pass through unhindered.
Changing the limiter from &mut to move is a prerequisite to implementing any combinator, otherwise I would have split this into two PRs.
The stream and sink extension traits, impls and structs are very similar (to the point where one could easily combine them into one). I've kept them separate though as otherwise one would always be forced to ratelimit both directions of a
Stream+Sink
object and there would be no way to limit just theStream
part while letting theSink
pass through unhindered.Changing the limiter from
&mut
to move is a prerequisite to implementing any combinator, otherwise I would have split this into two PRs.