Converts this set into the corresponding [`EnumSet`]. If any unknown bits are present in the set, this method will panic.
(&self)
| 261 | /// |
| 262 | /// If any unknown bits are present in the set, this method will panic. |
| 263 | pub fn as_enumset(&self) -> EnumSet<T> { |
| 264 | self.try_as_enumset() |
| 265 | .expect("Bitset contains invalid variants.") |
| 266 | } |
| 267 | |
| 268 | /// Attempts to convert this set into the corresponding [`EnumSet`]. |
| 269 | /// |