What you want is presumably a bitset with a statically determined size, eg. something like Bitset<64>
or Bitset<u64>
. I’m a bit flummoxed that such a thing does not actually seem to exist on crates.io, at least none with significant downloads. The fixedbitset
crate despite the name is in fact backed by a Vec and not fixed. enumset
is great if you have an enum, but not for generic unnamed bits. There’s smallbitset
which does provide a Set64
among others, so you might want to check it out.
1 Like