pub struct TombstoneManager { /* private fields */ }Expand description
Manager for tombstone-based logical deletion
Provides O(1) deletion checks during vector retrieval.
Implementations§
Source§impl TombstoneManager
impl TombstoneManager
Sourcepub fn new(path: impl AsRef<Path>, writable: bool) -> Result<Self>
pub fn new(path: impl AsRef<Path>, writable: bool) -> Result<Self>
Create a new tombstone manager
If the file exists, loads existing tombstones. If not, creates a new empty tombstone file.
Sourcepub fn delete(&self, id: InternalId) -> Result<bool>
pub fn delete(&self, id: InternalId) -> Result<bool>
Mark an ID as deleted
Sourcepub fn delete_batch(&self, ids: &[InternalId]) -> Result<usize>
pub fn delete_batch(&self, ids: &[InternalId]) -> Result<usize>
Mark multiple IDs as deleted
Sourcepub fn is_deleted(&self, id: InternalId) -> bool
pub fn is_deleted(&self, id: InternalId) -> bool
Check if an ID is deleted
Sourcepub fn filter_deleted(&self, ids: &[InternalId]) -> Vec<InternalId> ⓘ
pub fn filter_deleted(&self, ids: &[InternalId]) -> Vec<InternalId> ⓘ
Check multiple IDs for deletion
Sourcepub fn all_deleted(&self) -> Vec<InternalId> ⓘ
pub fn all_deleted(&self) -> Vec<InternalId> ⓘ
Get all deleted IDs (for compaction)
Auto Trait Implementations§
impl !Freeze for TombstoneManager
impl !RefUnwindSafe for TombstoneManager
impl Send for TombstoneManager
impl Sync for TombstoneManager
impl Unpin for TombstoneManager
impl UnsafeUnpin for TombstoneManager
impl UnwindSafe for TombstoneManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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