pub struct DeletionMap { /* private fields */ }Expand description
Tracks deleted documents per segment.
Implementations§
Source§impl DeletionMap
impl DeletionMap
pub fn new() -> Self
Sourcepub fn mark_deleted(&mut self, segment_id: SegmentId, doc_id: DocId)
pub fn mark_deleted(&mut self, segment_id: SegmentId, doc_id: DocId)
Mark a document as deleted in a segment.
Sourcepub fn is_deleted(&self, segment_id: SegmentId, doc_id: DocId) -> bool
pub fn is_deleted(&self, segment_id: SegmentId, doc_id: DocId) -> bool
Check if a document is deleted.
Sourcepub fn bitmap(&self, segment_id: SegmentId) -> Option<&RoaringBitmap>
pub fn bitmap(&self, segment_id: SegmentId) -> Option<&RoaringBitmap>
Get the deletion bitmap for a segment (if any deletions exist).
Sourcepub fn deleted_count(&self, segment_id: SegmentId) -> u64
pub fn deleted_count(&self, segment_id: SegmentId) -> u64
Number of deleted documents in a segment.
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Deserialize from bytes.
Trait Implementations§
Source§impl Clone for DeletionMap
impl Clone for DeletionMap
Source§fn clone(&self) -> DeletionMap
fn clone(&self) -> DeletionMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeletionMap
impl Debug for DeletionMap
Source§impl Default for DeletionMap
impl Default for DeletionMap
Source§fn default() -> DeletionMap
fn default() -> DeletionMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeletionMap
impl RefUnwindSafe for DeletionMap
impl Send for DeletionMap
impl Sync for DeletionMap
impl Unpin for DeletionMap
impl UnsafeUnpin for DeletionMap
impl UnwindSafe for DeletionMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more