pub struct MemoryStore { /* private fields */ }Implementations§
Source§impl MemoryStore
impl MemoryStore
Sourcepub async fn get_status(&self) -> Result<StoreStatus>
pub async fn get_status(&self) -> Result<StoreStatus>
Extended store statistics (counts, categories, top memories, task metrics).
Sourcepub async fn list_memories(
&self,
category: Option<MemoryCategory>,
) -> Result<Vec<MemoryRecord>>
pub async fn list_memories( &self, category: Option<MemoryCategory>, ) -> Result<Vec<MemoryRecord>>
List memories, optionally filtered by category.
Sourcepub async fn list_tasks(&self, limit: u32) -> Result<Vec<TaskRecord>>
pub async fn list_tasks(&self, limit: u32) -> Result<Vec<TaskRecord>>
List recent tasks with retrievals and memories created during each task.
Sourcepub async fn get_timeline(&self, limit: u32) -> Result<Vec<TimelineEvent>>
pub async fn get_timeline(&self, limit: u32) -> Result<Vec<TimelineEvent>>
Merged timeline of tasks and memory events.
Sourcepub async fn search_memories(&self, query: &str) -> Result<Vec<Memory>>
pub async fn search_memories(&self, query: &str) -> Result<Vec<Memory>>
Read-only semantic search — no task record, no retrieval side effects.
Sourcepub async fn search(&self, query: &str) -> Result<StartTaskResult>
pub async fn search(&self, query: &str) -> Result<StartTaskResult>
Semantic search via full task lifecycle (creates a task record).
Source§impl MemoryStore
impl MemoryStore
Sourcepub async fn report(&self, input: MemoryReportInput) -> Result<String>
pub async fn report(&self, input: MemoryReportInput) -> Result<String>
Unified memory report (correction, user input, or insight).
Sourcepub async fn end_task_with_decay(
&self,
task_id: &str,
input: TaskEndInput,
) -> Result<EndTaskWithDecayResult>
pub async fn end_task_with_decay( &self, task_id: &str, input: TaskEndInput, ) -> Result<EndTaskWithDecayResult>
End task and run weight decay.
Sourcepub async fn contradict(
&self,
memory_id: &str,
correction: Option<&str>,
) -> Result<ContradictResult>
pub async fn contradict( &self, memory_id: &str, correction: Option<&str>, ) -> Result<ContradictResult>
Flag a memory as wrong and optionally store a correction.
Source§impl MemoryStore
impl MemoryStore
pub fn new(config: MemzConfig, embed: EmbedFn) -> Self
pub fn dimensions(&self) -> u32
pub async fn init(&self) -> Result<()>
pub async fn start_task(&self, description: &str) -> Result<StartTaskResult>
pub async fn report_correction( &self, input: ReportCorrectionInput, ) -> Result<String>
pub async fn report_user_input(&self, input: ReportUserInput) -> Result<String>
pub async fn end_task(&self, task_id: &str, input: TaskEndInput) -> Result<()>
pub async fn decay(&self) -> Result<DecayResult>
pub async fn purge(&self, threshold: f64) -> Result<u32>
pub async fn get_stats(&self) -> Result<MemoryStats>
pub async fn get_top_by_weight(&self, limit: u32) -> Result<Vec<Memory>>
pub async fn insert_raw_memory( &self, content: &str, category: MemoryCategory, weight: f64, ) -> Result<String>
pub async fn embed_pending(&self) -> Result<usize>
pub async fn contradict_memory( &self, memory_id: &str, correction: Option<&str>, ) -> Result<(bool, Option<String>)>
pub async fn penalize_memory(&self, memory_id: &str, factor: f64) -> Result<()>
pub async fn close(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for MemoryStore
impl !RefUnwindSafe for MemoryStore
impl !UnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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