pub trait MemoryProvider: Send + Sync {
// Required methods
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<MemoryContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 ReasoningSession,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for memory providers (enables mock testing and multiple backends)
Required Methods§
Sourcefn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<MemoryContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<MemoryContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query memory for relevant context
Sourcefn store_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 ReasoningSession,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 ReasoningSession,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a reasoning session for future reference