pub struct MemoryStore {
pub sessions: MemorySessionStore,
pub embeddings: MemoryEmbeddingStore,
pub artifacts: MemoryArtifactStore,
pub executions: MemoryExecutionStore,
}Expand description
A composite in-memory store aggregating all four storage domains with coordinated operations, including cascading deletes.
Provides direct access to each sub-store through public fields for
fine-grained control, plus delete_session_cascading() for atomic
cross-domain cleanup.
§Example
use behest_store::memory::MemoryStore;
let store = MemoryStore::new();
// Use store.sessions, store.executions, store.embeddings, store.artifacts
// individually, or use store.delete_session_cascading() for full cleanup.Fields§
§sessions: MemorySessionStoreSession and message storage.
embeddings: MemoryEmbeddingStoreEmbedding storage.
artifacts: MemoryArtifactStoreArtifact storage.
executions: MemoryExecutionStoreTool execution and usage storage.
Implementations§
Source§impl MemoryStore
impl MemoryStore
Sourcepub async fn delete_session_cascading(&self, id: &Uuid) -> StoreResult<()>
pub async fn delete_session_cascading(&self, id: &Uuid) -> StoreResult<()>
Deletes a session and all related data across all sub-stores.
This is semantically equivalent to what a real database would do
with foreign-key ON DELETE CASCADE, but across in-memory collections.
Collects errors from all sub-stores instead of short-circuiting.
§Errors
Returns StorageError::BackendError
aggregating errors from any sub-stores that failed.
Trait Implementations§
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§fn default() -> MemoryStore
fn default() -> MemoryStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryStore
impl !RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe for MemoryStore
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