pub struct MemoryStore { /* private fields */ }Implementations§
Source§impl MemoryStore
impl MemoryStore
pub fn open() -> Result<Self>
pub fn get_block(&self, name: &str) -> Result<MemoryBlock>
pub fn blocks(&self) -> Result<Vec<MemoryBlock>>
pub fn update_block(&self, name: &str, content: &str) -> Result<()>
pub fn add( &self, content: &str, kind: &MemoryKind, importance: f32, source: Option<&str>, ) -> Result<String>
pub fn update(&self, id: &str, content: &str, importance: f32) -> Result<()>
pub fn delete(&self, id: &str) -> Result<()>
pub fn supersede(&self, old_id: &str, new_id: &str) -> Result<()>
pub fn search(&self, query: &str, limit: usize) -> Result<Vec<ScoredMemory>>
pub fn list( &self, kind: Option<&MemoryKind>, limit: usize, ) -> Result<Vec<Memory>>
pub fn snapshot(&self, limit: usize) -> Result<Vec<Memory>>
pub fn count(&self) -> Result<usize>
pub fn inject_context(&self, query: &str, count: usize) -> Result<String>
Trait Implementations§
impl Send for MemoryStore
impl Sync for MemoryStore
Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe 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
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