cai-storage
Pluggable storage backends for CAI entries.
Overview
cai-storage provides a flexible storage abstraction with multiple backend implementations. Use it to store and retrieve AI coding interactions.
Storage Trait
The core Storage trait defines the interface:
use ;
use Entry;
async
Implementations
MemoryStorage
In-memory storage for testing and temporary data:
use MemoryStorage;
let storage = new;
Filter
Query entries with filters:
use Filter;
use ;
let filter = Filter ;
let results = storage.query.await?;
Usage
Add to your Cargo.toml:
[]
= { = "../cai-storage" }
Design Decisions
- Async trait: Non-blocking operations for better performance
- Generic filters: Type-safe query filtering
- Arc: Thread-safe interior mutability
Testing
License
MIT OR Apache-2.0