MemoryHandler

Trait MemoryHandler 

Source
pub trait MemoryHandler: Send + Sync {
    // Required methods
    fn create_memory<'life0, 'async_trait>(
        &'life0 self,
        request: CreateMemoryRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_memory<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_memory<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
        request: UpdateMemoryRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_memory<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn search_memories<'life0, 'async_trait>(
        &'life0 self,
        request: SearchRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn migrate_memory<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
        to_tier: MemoryTier,
        reason: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn create_memory<'life0, 'async_trait>( &'life0 self, request: CreateMemoryRequest, ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_memory<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_memory<'life0, 'async_trait>( &'life0 self, id: Uuid, request: UpdateMemoryRequest, ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_memory<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn search_memories<'life0, 'async_trait>( &'life0 self, request: SearchRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn migrate_memory<'life0, 'async_trait>( &'life0 self, id: Uuid, to_tier: MemoryTier, reason: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Memory, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§