Skip to main content

SelfLearningMemoryExt

Trait SelfLearningMemoryExt 

Source
pub trait SelfLearningMemoryExt {
    // Required methods
    fn with_local_storage<'async_trait>(
        path: impl 'async_trait + AsRef<Path> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>;
    fn with_in_memory_storage<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>;
}
Expand description

Extension trait for SelfLearningMemory to provide convenience constructors using the Turso storage backend.

Required Methods§

Source

fn with_local_storage<'async_trait>( path: impl 'async_trait + AsRef<Path> + Send, ) -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>

Create a memory system with local SQLite storage.

Source

fn with_in_memory_storage<'async_trait>() -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>

Create a memory system with in-memory SQLite storage.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SelfLearningMemoryExt for SelfLearningMemory

Source§

fn with_local_storage<'async_trait>( path: impl 'async_trait + AsRef<Path> + Send, ) -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>

Source§

fn with_in_memory_storage<'async_trait>() -> Pin<Box<dyn Future<Output = Result<SelfLearningMemory>> + Send + 'async_trait>>

Implementors§