pub struct FileMemoryStore { /* private fields */ }Implementations§
Source§impl FileMemoryStore
impl FileMemoryStore
pub fn new(home_dir: &Path) -> Self
Sourcepub async fn expire_entries(
&self,
config: &MemoryExpiryConfig,
) -> Result<usize, AgentError>
pub async fn expire_entries( &self, config: &MemoryExpiryConfig, ) -> Result<usize, AgentError>
Expire old entries from MEMORY.md according to config.
Returns the number of entries removed (0 means no file write occurred).
Trait Implementations§
Source§impl MemoryStore for FileMemoryStore
impl MemoryStore for FileMemoryStore
fn read_memory<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemoryContent, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_memory<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 MemoryContent,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_user_profile<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_user_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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