pub struct WriteEngine { /* private fields */ }Expand description
The write engine orchestrates memory formation.
Implementations§
Source§impl WriteEngine
impl WriteEngine
Sourcepub fn ingest(
&self,
graph: &mut MemoryGraph,
events: Vec<CognitiveEvent>,
edges: Vec<Edge>,
) -> AmemResult<IngestResult>
pub fn ingest( &self, graph: &mut MemoryGraph, events: Vec<CognitiveEvent>, edges: Vec<Edge>, ) -> AmemResult<IngestResult>
Process a batch of new cognitive events and integrate them into the graph.
Sourcepub fn correct(
&self,
graph: &mut MemoryGraph,
old_node_id: u64,
new_content: &str,
session_id: u32,
) -> AmemResult<u64>
pub fn correct( &self, graph: &mut MemoryGraph, old_node_id: u64, new_content: &str, session_id: u32, ) -> AmemResult<u64>
Record a correction: marks old node as superseded, adds new node.
Sourcepub fn compress_session(
&self,
graph: &mut MemoryGraph,
session_id: u32,
summary: &str,
) -> AmemResult<u64>
pub fn compress_session( &self, graph: &mut MemoryGraph, session_id: u32, summary: &str, ) -> AmemResult<u64>
Compress a session into an episode node.
Sourcepub fn touch(&self, graph: &mut MemoryGraph, node_id: u64) -> AmemResult<()>
pub fn touch(&self, graph: &mut MemoryGraph, node_id: u64) -> AmemResult<()>
Touch a node (update access_count and last_accessed).
Sourcepub fn run_decay(
&self,
graph: &mut MemoryGraph,
current_time: u64,
) -> AmemResult<DecayReport>
pub fn run_decay( &self, graph: &mut MemoryGraph, current_time: u64, ) -> AmemResult<DecayReport>
Run decay calculations across all nodes.
Auto Trait Implementations§
impl Freeze for WriteEngine
impl RefUnwindSafe for WriteEngine
impl Send for WriteEngine
impl Sync for WriteEngine
impl Unpin for WriteEngine
impl UnsafeUnpin for WriteEngine
impl UnwindSafe for WriteEngine
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