I'm in the situation where a bitflags type from a third-party crate uses const _ = !0; (i.e. I can not modify the bitflags! definition and add/remove flags). I need the complement of all known/defined flags. However I do not see a way to truncate/... theses flags in this case or do a complement_defined or access FooFlags::_ or whatever. I can not even tell if there are extra bits set.
I'm in the situation where a bitflags type from a third-party crate uses
const _ = !0;(i.e. I can not modify thebitflags!definition and add/remove flags). I need thecomplementof all known/defined flags. However I do not see a way totruncate/... theses flags in this case or do acomplement_definedor accessFooFlags::_or whatever. I can not even tell if there are extra bits set.