pub struct MemoryStore { /* private fields */ }Implementations§
Source§impl MemoryStore
impl MemoryStore
pub fn new(config: MemzConfig, embed: EmbedFn) -> Self
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