pub trait MemoryService: Send + Sync {
// Required methods
fn add_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
session_id: &'life3 str,
entries: Vec<MemoryEntry>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn search<'life0, 'async_trait>(
&'life0 self,
req: SearchRequest,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn delete_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
session_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn add_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
session_id: &'life3 str,
entries: Vec<MemoryEntry>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
req: SearchRequest,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn delete_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete all memory entries for a specific user.
Required for GDPR right-to-erasure compliance. Removes all stored memories (including embeddings) for the given app and user.
Sourcefn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
session_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
app_name: &'life1 str,
user_id: &'life2 str,
session_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Delete all memory entries for a specific session.
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verify backend connectivity.
Returns Ok(()) if the backend is reachable and responsive.
The default implementation always succeeds (suitable for in-memory).