pub struct RoaringBitmap { /* private fields */ }Expand description
A Roaring Bitmap for efficiently tracking sets of u32 indices.
Optimized for the mix of sparse and dense dirty regions typical in terminal UI rendering. Indices are split into (high16, low16) pairs to select containers adaptively.
Implementations§
Source§impl RoaringBitmap
impl RoaringBitmap
Sourcepub fn insert(&mut self, value: u32) -> bool
pub fn insert(&mut self, value: u32) -> bool
Insert a value into the bitmap. Returns true if the value was new.
Sourcepub fn cardinality(&self) -> usize
pub fn cardinality(&self) -> usize
Return the number of values in the bitmap.
Sourcepub fn iter(&self) -> RoaringIter<'_> ⓘ
pub fn iter(&self) -> RoaringIter<'_> ⓘ
Iterate over all values in sorted order.
Sourcepub fn intersection(&self, other: &Self) -> Self
pub fn intersection(&self, other: &Self) -> Self
Compute the intersection of two bitmaps.
Sourcepub fn insert_range(&mut self, start: u32, end: u32)
pub fn insert_range(&mut self, start: u32, end: u32)
Insert a range of values [start, end).
Trait Implementations§
Source§impl Clone for RoaringBitmap
impl Clone for RoaringBitmap
Source§fn clone(&self) -> RoaringBitmap
fn clone(&self) -> RoaringBitmap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoaringBitmap
impl Debug for RoaringBitmap
Auto Trait Implementations§
impl Freeze for RoaringBitmap
impl RefUnwindSafe for RoaringBitmap
impl Send for RoaringBitmap
impl Sync for RoaringBitmap
impl Unpin for RoaringBitmap
impl UnsafeUnpin for RoaringBitmap
impl UnwindSafe for RoaringBitmap
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