pub struct FileMemoryStore { /* private fields */ }Expand description
File-based memory store with atomic writes and in-memory index.
memory_dir/
index.json
items/{id}.jsonImplementations§
Trait Implementations§
Source§impl MemoryStore for FileMemoryStore
impl MemoryStore for FileMemoryStore
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 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 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 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_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 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 clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for FileMemoryStore
impl !RefUnwindSafe for FileMemoryStore
impl Send for FileMemoryStore
impl Sync for FileMemoryStore
impl Unpin for FileMemoryStore
impl UnsafeUnpin for FileMemoryStore
impl UnwindSafe for FileMemoryStore
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