pub struct LocalMemoryStore { /* private fields */ }Expand description
In-memory store backed by a HashMap (no SQLite dep needed for initial impl). Replace with SQLite in production via the same trait.
Implementations§
Trait Implementations§
Source§impl Default for LocalMemoryStore
impl Default for LocalMemoryStore
Source§impl MemoryStore for LocalMemoryStore
impl MemoryStore for LocalMemoryStore
Source§fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
key: &'life2 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
key: &'life2 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a memory fact
Source§fn retrieve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retrieve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve a memory fact
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
query: &'life2 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryHit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
query: &'life2 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryHit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Semantic search over stored memories
Auto Trait Implementations§
impl Freeze for LocalMemoryStore
impl !RefUnwindSafe for LocalMemoryStore
impl Send for LocalMemoryStore
impl Sync for LocalMemoryStore
impl Unpin for LocalMemoryStore
impl UnsafeUnpin for LocalMemoryStore
impl !UnwindSafe for LocalMemoryStore
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