Rename SinkExt to PrepareSinkExt; define and use a SinkExt with a with_fn method
Right now our SinkExt
trait only adds methods to Pin<&mut OS> where OS: Sink
and &mut OS where OS: Sink
. That makes it problematic to use it if we want to add more methods (as I do) for all Sink
s.
I'm planning to rename SinkExt
to PrepareSinkExt
since its only function is prepare_send_from
, and then add a new SinkExt
.
(For the new SinkExt
I want to add a method like futures::SinkExt::with
that takes a regular function rather than a function returning a future. I expect that doing this will make type and lifetime influence easier when we're using Sink
s in RPC.)