pmat 3.26.0

PMAT - Zero-config AI context generation and code quality toolkit (CLI, MCP, HTTP)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::services::context::FileContext;
use anyhow::Result;
use std::path::Path;
use std::sync::Arc;

/// Trait for cache managers that support AST caching
#[async_trait::async_trait]
pub trait AstCacheManager: Send + Sync {
    /// Get or compute AST with caching
    async fn get_or_compute_ast<F, Fut>(&self, path: &Path, compute: F) -> Result<Arc<FileContext>>
    where
        F: FnOnce() -> Fut + Send,
        Fut: std::future::Future<Output = Result<FileContext>> + Send;
}