-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with the bytes
crates
#1444
Comments
We'll have a chance to look at this issue in more detail later, but briefly off the top of my head: check out how we handle this in 0.8. The |
Unfortunately that doesn't help, as the orphan rule prevents us from implementing the trait for an external type :/ |
It may be possible to workaround this via a newtype to experiment with this as a solution. |
The prevalence of I've forked the somewhat dead |
Filed upstream: tokio-rs/bytes#738 |
Looks like the last missing piece was published in 1.8: tokio-rs/bytes#741 |
A lot of my networking code uses
bytes
to handle efficient storing of incoming and outgoing packets. I would like to transition more of that code to usezerocopy
, but for that some integration would be required.The following example is for the parsing side of what I would like to do, but this fails as
ByteSlice
is not implemented forbytes::Bytes
orbytes::BytesMut
.I can't implement this in my own crate, as both the type and the trait are in 3rd party crates.
The text was updated successfully, but these errors were encountered: