Enum Bit Parity
This crate exposes a macro to enforce enum discriminants with a given bit parity. Using even or odd bit parity enforces a Hamming weight of two.
Example and Usage
How to use with Cargo:
[]
= "0.1.0"
To use in your crate:
use bit_parity;
This gets expanded to have the given bit parity as follows:
License
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0 or the MIT license https://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.