Add the option to auto-generate std::hash::Hash
as suggested by @freemin7 #62
#[bitfield(u32, hash = true)]
struct MyBitfield {
data: u16,
__: u8,
#[bits(8)]
extra: u8,
}
The hash implementation ignores any padding, but requires that all fields also implement Hash
(similar to Debug
).
Thanks to @freemin7 for suggesting this.