pub struct InMemoryStore { /* private fields */ }Expand description
Simple in-memory storage (for testing and development)
Implementations§
Source§impl InMemoryStore
impl InMemoryStore
Trait Implementations§
Source§impl Clone for InMemoryStore
impl Clone for InMemoryStore
Source§fn clone(&self) -> InMemoryStore
fn clone(&self) -> InMemoryStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryStore
impl Debug for InMemoryStore
Source§impl Default for InMemoryStore
impl Default for InMemoryStore
Source§impl MemoryStore for InMemoryStore
impl MemoryStore for InMemoryStore
Source§fn store<'life0, 'async_trait>(
&'life0 self,
item: MemoryItem,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store<'life0, 'async_trait>(
&'life0 self,
item: MemoryItem,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a memory item
Source§fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a memory by ID
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search memories by query
Search memories by tags
Source§fn get_recent<'life0, 'async_trait>(
&'life0 self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recent<'life0, 'async_trait>(
&'life0 self,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get recent memories
Source§fn get_important<'life0, 'async_trait>(
&'life0 self,
threshold: f32,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_important<'life0, 'async_trait>(
&'life0 self,
threshold: f32,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get important memories
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a memory
Auto Trait Implementations§
impl Freeze for InMemoryStore
impl !RefUnwindSafe for InMemoryStore
impl Send for InMemoryStore
impl Sync for InMemoryStore
impl Unpin for InMemoryStore
impl UnsafeUnpin for InMemoryStore
impl !UnwindSafe for InMemoryStore
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