Conversation
41a3827 to
afa6be1
Compare
|
@djkoloski ready for a review when you get a chance! |
| This is enabled by three core marker traits, each of which can be derived | ||
| This is enabled by four core marker traits, each of which can be derived | ||
| (e.g., `#[derive(FromBytes)]`): | ||
| - `FromZeroes` indicates that a sequence of zero bytes represents a valid |
There was a problem hiding this comment.
This wording is a little awkward, it could be interpreted as a sequence of length 0. Maybe something like "FromZeroes indicates that a sequence of bytes all set to zero represents a valid instance of a type.
There was a problem hiding this comment.
Good call; I've updated it, but kept the "Types..." prefix to be consistent with other traits. I can change all of them if you'd prefer.
There was a problem hiding this comment.
Missed change? I don't see this in the latest revision.
There was a problem hiding this comment.
Here's the diff I'm looking at: https://github.com/google/zerocopy/compare/afcea57c53372fd04d28bca8b2ea90db429a86e6..3fb2a0e342304d60ca354102d8bc2d7d2181d6fc
| } | ||
|
|
||
| // An enum is `FromZeroes` if: | ||
| // - Every possible bit pattern must be valid, which means that every bit |
There was a problem hiding this comment.
Does this comment need fixup? Or is this just a stricter guarantee for now until we go back and fix it up?
There was a problem hiding this comment.
The latter - right now, this is just a copy-paste from the comment on the FromBytes derive.
Closes #30
Closes #30