Solved: Is it possible to have something similar to an Option<Nonzero<u32>> that "plays nicely" with IntoBytes and FromBytes? #2628
Closed
kairoswater-jason
started this conversation in
General
Replies: 1 comment 1 reply
-
We do implement Can you give an example of some code you'd like to write but cannot? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In low level hardware and communications I often run across values that are effectively something like Option<Nonzero>.
(although sometimes it might be u32::MAX indicating None rather than zero)
I'm quite confident that that core::option::Option does not implement IntoBytes and FromBytes.
Do any off the shelf implementations exist for this sort of Option-like type that implement both IntoBytes and FromBytes?
Beta Was this translation helpful? Give feedback.
All reactions