pub struct SharedPersistentIndex { /* private fields */ }Expand description
Thread-safe wrapper for the persistent index
Implementations§
pub fn new(config: IndexConfig) -> Result<Self>
pub fn open(path: PathBuf, config: IndexConfig) -> Result<Self>
pub fn insert(&self, emb_id: Uuid, vector: Vec<f32>) -> Result<()>
pub fn search(&self, query: &[f32], k: usize) -> Vec<(Uuid, f32)>
pub fn save(&self) -> Result<()>
pub fn checkpoint(&self, state_root: [u8; 32]) -> Result<()>
pub fn is_valid(&self, current_root: &[u8; 32]) -> bool
pub fn invalidate(&self)
pub fn needs_rebuild(&self) -> bool
pub fn clear(&self) -> Result<()>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
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