MemoryProvider

Trait MemoryProvider 

Source
pub trait MemoryProvider: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn load<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ContextResult<MemoryContent>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for providing memory content from various sources.

Implementations can load CLAUDE.md content from:

  • In-memory strings (for testing/programmatic use)
  • File system (for CLI-compatible behavior)
  • Remote sources (for enterprise deployment)

Required Methods§

Source

fn name(&self) -> &str

Returns the provider name for debugging/logging.

Source

fn load<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ContextResult<MemoryContent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads memory content from this provider.

Implementors§