pub struct DocBitmap { /* private fields */ }Expand description
A compressed set of segment-local document identifiers.
Implementations§
Source§impl DocBitmap
impl DocBitmap
Sourcepub fn from_ids(ids: impl IntoIterator<Item = u32>) -> Self
pub fn from_ids(ids: impl IntoIterator<Item = u32>) -> Self
Creates a bitmap from document identifiers.
Sourcepub fn insert(&mut self, document: u32) -> bool
pub fn insert(&mut self, document: u32) -> bool
Inserts one document identifier and reports whether it was new.
Sourcepub fn remove(&mut self, document: u32) -> bool
pub fn remove(&mut self, document: u32) -> bool
Removes one document identifier and reports whether it was present.
Sourcepub fn contains(&self, document: u32) -> bool
pub fn contains(&self, document: u32) -> bool
Returns whether the document identifier is present.
Sourcepub fn cardinality(&self) -> u64
pub fn cardinality(&self) -> u64
Returns the exact bitmap cardinality.
Sourcepub fn union_with(&mut self, other: &Self)
pub fn union_with(&mut self, other: &Self)
Mutates this bitmap to its union with other.
Sourcepub fn intersect_with(&mut self, other: &Self)
pub fn intersect_with(&mut self, other: &Self)
Mutates this bitmap to its intersection with other.
Trait Implementations§
impl Eq for DocBitmap
impl StructuralPartialEq for DocBitmap
Auto Trait Implementations§
impl Freeze for DocBitmap
impl RefUnwindSafe for DocBitmap
impl Send for DocBitmap
impl Sync for DocBitmap
impl Unpin for DocBitmap
impl UnsafeUnpin for DocBitmap
impl UnwindSafe for DocBitmap
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