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 compaction_projection_persistence(&self) -> CompactionProjectionPersistence
fn compaction_projection_persistence(&self) -> CompactionProjectionPersistence
Compaction projection durability contract for this store.
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 publish_ephemeral_compaction_batch(
&self,
batch: MemoryIndexBatch,
) -> Result<MemoryIndexReceipt, MemoryStoreError>
fn publish_ephemeral_compaction_batch( &self, batch: MemoryIndexBatch, ) -> Result<MemoryIndexReceipt, MemoryStoreError>
Synchronously publish an ephemeral compaction batch all-or-none. 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 and permanently 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.
Source§fn stage_compaction_batch<'life0, 'async_trait>(
&'life0 self,
projection: CompactionProjectionId,
batch: MemoryIndexBatch,
) -> Pin<Box<dyn Future<Output = Result<CompactionStageReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn stage_compaction_batch<'life0, 'async_trait>(
&'life0 self,
projection: CompactionProjectionId,
batch: MemoryIndexBatch,
) -> Pin<Box<dyn Future<Output = Result<CompactionStageReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Persist a compaction batch durably but invisibly. Read more
Source§fn finalize_compaction_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
projection: &'life1 CompactionProjectionId,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn finalize_compaction_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
projection: &'life1 CompactionProjectionId,
) -> Pin<Box<dyn Future<Output = Result<MemoryIndexReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Idempotently publish one previously staged durable batch.
Source§fn abort_compaction_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
projection: &'life1 CompactionProjectionId,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn abort_compaction_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
projection: &'life1 CompactionProjectionId,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Idempotently discard one uncommitted invisible stage.
Source§fn reconcile_compaction_stages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner: &'life1 MemoryOwner,
committed: &'life2 [CompactionProjectionId],
) -> Pin<Box<dyn Future<Output = Result<CompactionStageReconcileReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn reconcile_compaction_stages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner: &'life1 MemoryOwner,
committed: &'life2 [CompactionProjectionId],
) -> Pin<Box<dyn Future<Output = Result<CompactionStageReconcileReceipt, MemoryStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Reconcile durable invisible stages against authoritative transcript
rewrite identities at agent-build ingress. Read more
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
impl<T> CoreExecutorTurnFinalizationGuard for Twhere
T: Send,
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