google / google/zerocopy

Implement `IntoBytes` for `Option` types?

Open
#596 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.