snafu
snafu copied to clipboard
Extension trait for Sink
Currently, you cannot convert Sink::Error with .context. I suggest to add extension trait, similar to TryStreamExt, for Sinks, to make error conversion more convinient.
That seems reasonable. I was under the impression that Sinks were semi-deprecated, which is why I didn't add support for them originally.
General shape of how this would work:
- Add
sink.rstosrc/futures01/andsrc/futures/, importing them from the relevant modules. - Tests should be added to
/compatibility-tests/futures-0.1and/compatibility-tests/futures
Sink trait in futures 0.3 is placed under futures-sink crate, while futures reexprots it. Snafu already depends on futures (internal-dev-dep), should I hide extension trait behind feature flag, or make futures dependency mandatory?