pub struct StubVectorStore;Expand description
Stub Vector Store 实现
所有方法均返回 Unsupported 错误,仅在未启用 real-pg feature 时
提供一个可编译的占位实现。
Implementations§
Trait Implementations§
Source§impl Default for StubVectorStore
impl Default for StubVectorStore
Source§impl PgVectorStore for StubVectorStore
impl PgVectorStore for StubVectorStore
Source§fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_dimension: usize,
_metric: Option<VectorMetric>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_dimension: usize,
_metric: Option<VectorMetric>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create collection
Source§fn delete_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete collection
Source§fn insert<'life0, 'life1, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert<'life0, 'life1, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_records: Vec<VectorRecord>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert vector record (upsert semantics: same id overwrites)
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_query: &'life2 [f32],
_top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_query: &'life2 [f32],
_top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Similarity search Read more
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VectorRecord>, VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_collection: &'life1 str,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VectorRecord>, VectorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get single record
Auto Trait Implementations§
impl Freeze for StubVectorStore
impl RefUnwindSafe for StubVectorStore
impl Send for StubVectorStore
impl Sync for StubVectorStore
impl Unpin for StubVectorStore
impl UnsafeUnpin for StubVectorStore
impl UnwindSafe for StubVectorStore
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