pub struct VectorStore {
pub vectors: RwLock<Vec<VectorEntry>>,
pub dimension: RwLock<Option<usize>>,
pub hnsw: Arc<OnceLock<RwLock<Option<HnswIndex>>>>,
/* private fields */
}Fields§
§vectors: RwLock<Vec<VectorEntry>>§dimension: RwLock<Option<usize>>§hnsw: Arc<OnceLock<RwLock<Option<HnswIndex>>>>Implementations§
Source§impl VectorStore
impl VectorStore
pub fn new(hnsw: Arc<OnceLock<RwLock<Option<HnswIndex>>>>) -> Self
pub fn apply_inserts(&self, inserts: Vec<VectorEntry>)
pub fn apply_deletes(&self, deletes: Vec<(RowId, TxId)>)
pub fn clear_hnsw(&self, accountant: &MemoryAccountant)
pub fn insert_loaded_vector(&self, entry: VectorEntry)
pub fn set_dimension(&self, dimension: usize)
pub fn vector_count(&self) -> usize
pub fn all_entries(&self) -> Vec<VectorEntry>
pub fn dimension(&self) -> Option<usize>
pub fn has_hnsw_index(&self) -> bool
pub fn set_hnsw_bytes(&self, bytes: usize)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VectorStore
impl !RefUnwindSafe for VectorStore
impl Send for VectorStore
impl Sync for VectorStore
impl Unpin for VectorStore
impl UnsafeUnpin for VectorStore
impl !UnwindSafe for VectorStore
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> 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