Struct hi_sparse_bitset::DataBlock
source · pub struct DataBlock<Block> {
pub start_index: usize,
pub bit_block: Block,
}Fields§
§start_index: usize§bit_block: BlockImplementations§
source§impl<Block: BitBlock> DataBlock<Block>
impl<Block: BitBlock> DataBlock<Block>
sourcepub fn traverse<F>(&self, f: F) -> ControlFlow<()>
pub fn traverse<F>(&self, f: F) -> ControlFlow<()>
traverse approx. 15% faster then iterator
pub fn iter(&self) -> DataBlockIter<Block> ⓘ
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Calculate elements count in DataBlock.
On most platforms, this should be faster then manually traversing DataBlock and counting elements. It use hardware supported popcnt operations, whenever possible.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<Block> RefUnwindSafe for DataBlock<Block>where
Block: RefUnwindSafe,
impl<Block> Send for DataBlock<Block>where
Block: Send,
impl<Block> Sync for DataBlock<Block>where
Block: Sync,
impl<Block> Unpin for DataBlock<Block>where
Block: Unpin,
impl<Block> UnwindSafe for DataBlock<Block>where
Block: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more