num
num copied to clipboard
Trait size of number in bits
I'm interest in having a trait that return the number of bits of T, std only have associated constant, u8::BITS. Similar to num::Bounded.
Alternative, let n_bits = std::mem::size_of::<T>() * u8::BITS as usize;.
This would be insanely useful for bit manipulation, second this.