pub struct VectorBackendStore { /* private fields */ }Expand description
Adapter over the kernel’s VectorBackend
(HNSW, DiskANN, hybrid). The backend’s dimensionality must be DIMS.
The backend id is a 64-bit hash of (instance, id); a hash collision
between two different pairs is refused rather than overwriting.
Implementations§
Source§impl VectorBackendStore
impl VectorBackendStore
Sourcepub fn new(backend: Arc<dyn VectorBackend>) -> Self
pub fn new(backend: Arc<dyn VectorBackend>) -> Self
Wrap backend.
Sourcepub fn persistent(
backend: Arc<dyn VectorBackend>,
path: &Path,
max_log_bytes: u64,
) -> Result<Self, OpenError>
pub fn persistent( backend: Arc<dyn VectorBackend>, path: &Path, max_log_bytes: u64, ) -> Result<Self, OpenError>
Wrap backend and keep every accepted batch in the log at path
(capped at max_log_bytes). Records already in the log are replayed
into backend first, so a restarted owner has what it had.
Trait Implementations§
Source§impl IngestStore for VectorBackendStore
Available on crate feature ecc only.
impl IngestStore for VectorBackendStore
Available on crate feature
ecc only.Source§fn ingest(
&self,
from: &Provenance,
vectors: &[IngestVector],
dedup: bool,
) -> Result<IngestOutcome, StoreError>
fn ingest( &self, from: &Provenance, vectors: &[IngestVector], dedup: bool, ) -> Result<IngestOutcome, StoreError>
Write a batch.
Auto Trait Implementations§
impl !Freeze for VectorBackendStore
impl !RefUnwindSafe for VectorBackendStore
impl !UnwindSafe for VectorBackendStore
impl Send for VectorBackendStore
impl Sync for VectorBackendStore
impl Unpin for VectorBackendStore
impl UnsafeUnpin for VectorBackendStore
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> 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