pub struct SimpleMemoryStore { /* private fields */ }Expand description
Simple in-memory store using substring matching.
This is a test-only implementation. Production use cases should use a vector-embedding-based store (e.g. HNSW). The substring matching here is not suitable for semantic search.
Implementations§
Trait Implementations§
Source§impl Default for SimpleMemoryStore
impl Default for SimpleMemoryStore
Source§impl MemoryStore for SimpleMemoryStore
impl MemoryStore for SimpleMemoryStore
Source§fn index_scoped_batch<'life0, 'async_trait>(
&'life0 self,
batch: MemoryIndexBatch,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn index_scoped_batch<'life0, 'async_trait>(
&'life0 self,
batch: MemoryIndexBatch,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Atomically index a typed, owner-scoped memory batch. Read more
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 MemorySearchScope,
query: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryResult>, MemoryStoreError>> + 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,
scope: &'life1 MemorySearchScope,
query: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryResult>, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Semantic search: return up to
limit results ordered by relevance.Source§fn drop_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
owner: &'life1 MemoryOwner,
) -> Pin<Box<dyn Future<Output = Result<MemoryScopeDropReceipt, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
owner: &'life1 MemoryOwner,
) -> Pin<Box<dyn Future<Output = Result<MemoryScopeDropReceipt, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically drop every indexed entry owned by
owner. Read moreSource§fn enumerate_scoped<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemorySearchScope,
request: MemoryEnumerationRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryEnumerationPage, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn enumerate_scoped<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemorySearchScope,
request: MemoryEnumerationRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryEnumerationPage, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Enumerate one page of a scope’s records in durable-id order. Read more
Source§fn index_scoped<'life0, 'async_trait>(
&'life0 self,
request: MemoryIndexRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn index_scoped<'life0, 'async_trait>(
&'life0 self,
request: MemoryIndexRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Index a typed, owner-scoped memory request.
Auto Trait Implementations§
impl !Freeze for SimpleMemoryStore
impl !RefUnwindSafe for SimpleMemoryStore
impl !UnwindSafe for SimpleMemoryStore
impl Send for SimpleMemoryStore
impl Sync for SimpleMemoryStore
impl Unpin for SimpleMemoryStore
impl UnsafeUnpin for SimpleMemoryStore
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