Implement `IntoBytes` for `Option` types?
Open
blocked-on-rust
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
Similar to https://github.com/google/zerocopy/issues/293, we should ensure that it's guaranteed that `Option
` satisfies `IntoBytes` (where `P` is a pointer type which is subject to NPO), and emit an `IntoBytes` impl.
This is blocked on https://github.com/rust-lang/rust/issues/117591, which guarantees that observing the bytes of a `None::
` is sound. It is also blocked on guaranteeing that observing the bytes of a `Some::
` is sound, which is effectively ptr2int.
Contributor guide
Assessment
This issue has not been assessed yet.