Skip to main content

FileMemoryRepository

Struct FileMemoryRepository 

Source
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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileMemoryRepository

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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,

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,

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,

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,

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,

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,

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,

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,

Return explicit admission and use counts for a node.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.