MCPcopy Create free account
hub / github.com/Lymia/enumset / valid_len

Method valid_len

enumset/src/impl_set_mixed.rs:141–143  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

139 /// Returns the number of elements in this set, excluding unknown bits.
140 #[inline(always)]
141 pub fn valid_len(&self) -> usize {
142 (self.repr & T::ALL_BITS).count_ones() as usize
143 }
144
145 /// Returns whether this bitset contains any bits that do not correspond to a valid variant.
146 #[inline(always)]

Callers

nothing calls this directly

Calls 1

count_onesMethod · 0.80

Tested by

no test coverage detected