pub struct InMemoryDocumentStore { /* private fields */ }Expand description
内存文档存储
Implementations§
Source§impl InMemoryDocumentStore
impl InMemoryDocumentStore
Sourcepub fn new() -> InMemoryDocumentStore
pub fn new() -> InMemoryDocumentStore
创建新的内存文档存储
Trait Implementations§
Source§impl Default for InMemoryDocumentStore
impl Default for InMemoryDocumentStore
Source§fn default() -> InMemoryDocumentStore
fn default() -> InMemoryDocumentStore
Returns the “default value” for a type. Read more
Source§impl DocumentStore for InMemoryDocumentStore
impl DocumentStore for InMemoryDocumentStore
Source§fn add_document<'life0, 'async_trait>(
&'life0 self,
document: Document,
) -> Pin<Box<dyn Future<Output = Result<String, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryDocumentStore: 'async_trait,
fn add_document<'life0, 'async_trait>(
&'life0 self,
document: Document,
) -> Pin<Box<dyn Future<Output = Result<String, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryDocumentStore: 'async_trait,
添加文档
Source§fn add_documents<'life0, 'async_trait>(
&'life0 self,
documents: Vec<Document>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryDocumentStore: 'async_trait,
fn add_documents<'life0, 'async_trait>(
&'life0 self,
documents: Vec<Document>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemoryDocumentStore: 'async_trait,
批量添加文档
Source§fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryDocumentStore: 'async_trait,
fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryDocumentStore: 'async_trait,
获取文档
Source§fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryDocumentStore: 'async_trait,
fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryDocumentStore: 'async_trait,
删除文档
Auto Trait Implementations§
impl Freeze for InMemoryDocumentStore
impl RefUnwindSafe for InMemoryDocumentStore
impl Send for InMemoryDocumentStore
impl Sync for InMemoryDocumentStore
impl Unpin for InMemoryDocumentStore
impl UnsafeUnpin for InMemoryDocumentStore
impl UnwindSafe for InMemoryDocumentStore
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