Skip to main content

Memory

Trait Memory 

Source
pub trait Memory: Memory {
    // Provided methods
    fn get_context<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ConversationContext>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn compress<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _summarizer: Option<&'life1 dyn Summarizer>,
    ) -> Pin<Box<dyn Future<Output = Result<CompressResult>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn needs_compression(&self) -> bool { ... }
}
Expand description

Extended memory trait that preserves the original interface.

Provided Methods§

Source

fn get_context<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ConversationContext>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source

fn compress<'life0, 'life1, 'async_trait>( &'life0 self, _summarizer: Option<&'life1 dyn Summarizer>, ) -> Pin<Box<dyn Future<Output = Result<CompressResult>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn needs_compression(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§