Closed fengalin closed 10 months ago
I just realized this should also be applied to To{Bit,Byte}StreamWith
. I'll push an update tomorrow.
It's ready now.
Thank you for your reactivity @tuffy!
Since this requires a major version bump, I understand it might take some times before the next release. Do you have an idea when that could occur though? Just asking so I can schedule some downstream modifications accordingly.
Thanks for the release @tuffy!
Warning: this proposal introduces a breaking change. The change is as trivial as adding
<'_>
, but all implementers of{To,From}{Bit,Byte}StreamWith
would be affected. IMO this would warrant a major version bump.See the examples for a complete use case.
In current implementation,
{To,From}{Bit,Byte}StreamWith
impose that theContext
be static. In some cases, we want to pass aContext
which owns a reference to another struct.This MR adds a lifetime to these traits to allow using a
Context
constrained by a lifetime. Ex.:Implementations for which the
Context
is'static
bound can use: