Skip to content
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

Implement NoCell, IntoBytes and possibly other traits for std::convert::Infallible #1528

Open
mseravalli opened this issue Jul 17, 2024 · 1 comment
Labels
customer-request Documents customer requests.

Comments

@mseravalli
Copy link

mseravalli commented Jul 17, 2024

What is the name of your project?
Fuchsia netstack3

Please provide a link to your project (GitHub repository, crates.io page, etc).
https://cs.opensource.google/fuchsia/fuchsia/+/main:src/connectivity/

What features would you like from zerocopy?
It might be useful to implement NoCell, IntoBytes and possibly other traits for std::convert::Infallible so that it can be used e.g. in associated types. This would improve how specific invariants are enforced and would allow use Infallible instead of () or a custom defined type with the same behavior of Infallible.

@mseravalli mseravalli added the customer-request Documents customer requests. label Jul 17, 2024
@joshlf joshlf changed the title Implement NoCell, IntoBytes and possibly other traits for std::convert::Infallible Implement NoCell, IntoBytes and possibly other traits for std::convert::Infallible Jul 17, 2024
@joshlf
Copy link
Member

joshlf commented Jul 17, 2024

Thanks for this, @mseravalli!

Just a heads up that, thanks to #1292, we won't be able to vendor new versions of zerocopy (including any that would include an implementation of this issue) into Fuchsia until rust-lang/rust#45713 is fixed, published in a new Rust toolchain version, and that version is vendored into Fuchsia. I discovered the issue when trying to vendor (see my WIP CL stack here), and so far the only problem I've found is in packet-formats. Since you guys own that library, you could potentially work around it by changing the visibility of some types if you care about getting this in on a particular timeline; feel free to reach out internally if you would like guidance on how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-request Documents customer requests.
Projects
None yet
Development

No branches or pull requests

2 participants