pub struct BitmapIndex { /* private fields */ }Expand description
Roaring-bitmap-backed tag index.
Maps tag strings to roaring bitmaps for fast AND/OR/NOT set operations. Uses an internal u32 offset for each MemoryId.
Implementations§
Source§impl BitmapIndex
impl BitmapIndex
Sourcepub fn remove_tag(&self, id: MemoryId, tag: &str)
pub fn remove_tag(&self, id: MemoryId, tag: &str)
Remove a tag for the given memory id.
Sourcepub fn query_tag(&self, tag: &str) -> Vec<MemoryId>
pub fn query_tag(&self, tag: &str) -> Vec<MemoryId>
Get all memory ids that have the given tag.
Get memory ids that have ALL given tags (intersection).
Get memory ids that have ANY of the given tags (union).
Sourcepub fn remove_all(&self, id: MemoryId)
pub fn remove_all(&self, id: MemoryId)
Remove all tags for a given memory id.
Source§impl BitmapIndex
impl BitmapIndex
Sourcepub fn save(&self, path: &Path) -> MenteResult<()>
pub fn save(&self, path: &Path) -> MenteResult<()>
Save the bitmap index to a JSON file.
Sourcepub fn load(path: &Path) -> MenteResult<Self>
pub fn load(path: &Path) -> MenteResult<Self>
Load the bitmap index from a JSON file.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BitmapIndex
impl !RefUnwindSafe for BitmapIndex
impl Send for BitmapIndex
impl Sync for BitmapIndex
impl Unpin for BitmapIndex
impl UnsafeUnpin for BitmapIndex
impl UnwindSafe for BitmapIndex
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