pub struct BitSlice<'a> { /* private fields */ }
Expand description
Slice of bits. This type is used to mark Resource
args
in imported / exported functions.
Implementations§
source§impl<'a> BitSlice<'a>
impl<'a> BitSlice<'a>
sourcepub fn is_set(&self, idx: usize) -> bool
pub fn is_set(&self, idx: usize) -> bool
Checks if a bit with the specified 0-based index is set.
sourcepub fn set_indices(&self) -> impl Iterator<Item = usize> + '_
pub fn set_indices(&self) -> impl Iterator<Item = usize> + '_
Iterates over the indexes of set bits in this slice.
sourcepub fn count_ones(&self) -> usize
pub fn count_ones(&self) -> usize
Returns the number of set bits in this slice.