pub struct CompositeMemory { /* private fields */ }Implementations§
Source§impl CompositeMemory
impl CompositeMemory
pub fn new( providers: Vec<Box<dyn MemoryProvider>>, read_strategy: ReadStrategy, ) -> Self
Trait Implementations§
Source§impl MemoryProvider for CompositeMemory
impl MemoryProvider for CompositeMemory
fn read<'life0, 'async_trait>(
&'life0 self,
options: MemoryReadOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ModelMessage>,
options: MemoryWriteOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for CompositeMemory
impl !RefUnwindSafe for CompositeMemory
impl Send for CompositeMemory
impl Sync for CompositeMemory
impl Unpin for CompositeMemory
impl UnsafeUnpin for CompositeMemory
impl !UnwindSafe for CompositeMemory
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