pub struct InMemoryVectorIndex { /* private fields */ }Expand description
Exact, session-ephemeral vector index backed by immutable partition blocks.
Implementations§
Source§impl InMemoryVectorIndex
impl InMemoryVectorIndex
pub fn new(descriptor: VectorIndexDescriptor) -> VectorResult<Self>
Trait Implementations§
Source§impl Clone for InMemoryVectorIndex
impl Clone for InMemoryVectorIndex
Source§fn clone(&self) -> InMemoryVectorIndex
fn clone(&self) -> InMemoryVectorIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryVectorIndex
impl Debug for InMemoryVectorIndex
Source§impl VectorIndex for InMemoryVectorIndex
impl VectorIndex for InMemoryVectorIndex
Source§fn descriptor(&self) -> &VectorIndexDescriptor
fn descriptor(&self) -> &VectorIndexDescriptor
Return the immutable shape and resource limits of this index.
Source§fn status(&self) -> VectorIndexStatus
fn status(&self) -> VectorIndexStatus
Return the latest locally observed status without waiting for I/O. Read more
Source§fn change_token(&self) -> Option<VectorIndexChangeToken>
fn change_token(&self) -> Option<VectorIndexChangeToken>
Return exact evidence for the current revision of one index history. Read more
Source§fn observe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexObservation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn observe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexObservation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Observe one self-consistent published revision. Read more
Source§fn mutation_consistency(&self) -> VectorMutationConsistency
fn mutation_consistency(&self) -> VectorMutationConsistency
Return the strongest partition-mutation ordering contract implemented
by this backend.
Source§fn replace_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replace_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically replace every record in
partition. Read moreSource§fn replace_partition_if_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
expected_revision: VectorRevision,
records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replace_partition_if_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
expected_revision: VectorRevision,
records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically replace one partition only when the complete index still has
expected_revision. Read moreSource§fn remove_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically remove one partition. Missing partitions are a no-op.
Source§fn remove_partition_if_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
expected_revision: VectorRevision,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_partition_if_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
expected_revision: VectorRevision,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically remove one partition only when the complete index still has
expected_revision.Source§fn search<'life0, 'async_trait>(
&'life0 self,
request: VectorSearchRequest,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorSearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
request: VectorSearchRequest,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorSearchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search one immutable index revision.
Source§fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = VectorResult<VectorIndexStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove every partition. Clearing an empty index is a no-op.
Auto Trait Implementations§
impl Freeze for InMemoryVectorIndex
impl RefUnwindSafe for InMemoryVectorIndex
impl Send for InMemoryVectorIndex
impl Sync for InMemoryVectorIndex
impl Unpin for InMemoryVectorIndex
impl UnsafeUnpin for InMemoryVectorIndex
impl UnwindSafe for InMemoryVectorIndex
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