Trait bit_struct::BitCount 
source · [−]Expand description
A trait which defines how many bits are needed to store a struct.
Safety
Define Num as {i,u}{8,16,32,64,128}.
- when calling 
core::mem::transmuteonSelf, only bits [0, COUNT) can be non-zero TryFrom<Num>producesSome(x)<=>core::mem::transmute(num)produces a valid Self(x)TryFrom<Num>producesNone<=>core::mem::transmute(num)produces an invalid state for Self