pub struct FileMemoryRepository { /* private fields */ }Expand description
Durable local repository backed by a checksummed write-ahead journal.
One live instance owns a repository directory at a time. Mutations are validated before they are appended and synced; only then are they published to the in-memory read view. A restart deterministically replays the journal.
Implementations§
Trait Implementations§
Source§impl Clone for FileMemoryRepository
impl Clone for FileMemoryRepository
Source§fn clone(&self) -> FileMemoryRepository
fn clone(&self) -> FileMemoryRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileMemoryRepository
impl Debug for FileMemoryRepository
Source§impl MemoryRepository for FileMemoryRepository
impl MemoryRepository for FileMemoryRepository
Source§fn apply<'life0, 'async_trait>(
&'life0 self,
change_set: MemoryChangeSet,
) -> Pin<Box<dyn Future<Output = Result<MemoryChangeResult, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply<'life0, 'async_trait>(
&'life0 self,
change_set: MemoryChangeSet,
) -> Pin<Box<dyn Future<Output = Result<MemoryChangeResult, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Atomically apply a bounded, revision-checked change set.
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 MemoryNamespace,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryNode>, MemoryRepositoryError>> + 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,
namespace: &'life1 MemoryNamespace,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryNode>, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read one node from an exact namespace without recording access.
Source§fn query<'life0, 'async_trait>(
&'life0 self,
query: MemoryQuery,
) -> Pin<Box<dyn Future<Output = Result<MemoryQueryResult, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
query: MemoryQuery,
) -> Pin<Box<dyn Future<Output = Result<MemoryQueryResult, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query one exact namespace without mutating repository state.
Source§fn snapshot_namespace<'life0, 'async_trait>(
&'life0 self,
request: MemorySnapshotRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryNamespaceSnapshot, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot_namespace<'life0, 'async_trait>(
&'life0 self,
request: MemorySnapshotRequest,
) -> Pin<Box<dyn Future<Output = Result<MemoryNamespaceSnapshot, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Capture one complete, bounded, deterministic namespace view. Read more
Source§fn namespace_change_token<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 MemoryNamespace,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryNamespaceChangeToken>, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn namespace_change_token<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 MemoryNamespace,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryNamespaceChangeToken>, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return an optional exact-namespace change token. Read more
Source§fn record_admission<'life0, 'async_trait>(
&'life0 self,
event: MemoryAccessEvent,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_admission<'life0, 'async_trait>(
&'life0 self,
event: MemoryAccessEvent,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Record that the host admitted the current active node revision into a model context.
Source§fn record_use<'life0, 'async_trait>(
&'life0 self,
event: MemoryAccessEvent,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_use<'life0, 'async_trait>(
&'life0 self,
event: MemoryAccessEvent,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Record that the host cited, selected, or otherwise used a node.
Source§fn usage_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 MemoryNamespace,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MemoryUsageSummary, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn usage_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 MemoryNamespace,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MemoryUsageSummary, MemoryRepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return explicit admission and use counts for a node.
Auto Trait Implementations§
impl !RefUnwindSafe for FileMemoryRepository
impl !UnwindSafe for FileMemoryRepository
impl Freeze for FileMemoryRepository
impl Send for FileMemoryRepository
impl Sync for FileMemoryRepository
impl Unpin for FileMemoryRepository
impl UnsafeUnpin for FileMemoryRepository
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