pub struct Cache {Show 15 fields
pub schema: String,
pub version: String,
pub generated_at: DateTime<Utc>,
pub git_commit: Option<String>,
pub project: ProjectInfo,
pub stats: Stats,
pub source_files: HashMap<String, DateTime<Utc>>,
pub files: HashMap<String, FileEntry>,
pub symbols: HashMap<String, SymbolEntry>,
pub graph: Option<CallGraph>,
pub domains: HashMap<String, DomainEntry>,
pub constraints: Option<ConstraintIndex>,
pub provenance: ProvenanceStats,
pub bridge: BridgeStats,
pub conventions: Conventions,
}Expand description
@acp:summary “Complete ACP cache file structure (schema-compliant)” @acp:lock normal
Fields§
§schema: StringJSON Schema URL for validation
version: StringSchema version (required)
generated_at: DateTime<Utc>Generation timestamp (required)
git_commit: Option<String>Git commit SHA (optional)
project: ProjectInfoProject metadata (required)
stats: StatsAggregate statistics (required)
source_files: HashMap<String, DateTime<Utc>>Map of file paths to modification times for staleness detection (required)
files: HashMap<String, FileEntry>Files indexed by path (required)
symbols: HashMap<String, SymbolEntry>Symbols indexed by name (required)
graph: Option<CallGraph>Call graph relationships (optional)
domains: HashMap<String, DomainEntry>Domain groupings (optional)
constraints: Option<ConstraintIndex>AI behavioral constraints (optional)
provenance: ProvenanceStatsRFC-0003: Annotation provenance statistics (optional)
bridge: BridgeStatsRFC-0006: Bridge statistics (optional)
conventions: ConventionsRFC-0015: Auto-detected naming and import conventions (optional)
Implementations§
Source§impl Cache
impl Cache
Sourcepub fn from_json<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_json<P: AsRef<Path>>(path: P) -> Result<Self>
@acp:summary “Load cache from JSON file”
Sourcepub fn write_json<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn write_json<P: AsRef<Path>>(&self, path: P) -> Result<()>
@acp:summary “Write cache to JSON file”
Sourcepub fn get_symbol(&self, name: &str) -> Option<&SymbolEntry>
pub fn get_symbol(&self, name: &str) -> Option<&SymbolEntry>
@acp:summary “Get a symbol by name - O(1) lookup”
Sourcepub fn get_file(&self, path: &str) -> Option<&FileEntry>
pub fn get_file(&self, path: &str) -> Option<&FileEntry>
@acp:summary “Get a file by path - O(1) lookup with cross-platform path normalization”
Handles various path formats:
- With or without
./prefix:src/file.tsand./src/file.ts - Windows backslashes:
src\file.ts - Redundant separators:
src//file.ts - Relative components:
src/../src/file.ts
Sourcepub fn get_callers(&self, symbol: &str) -> Option<&Vec<String>>
pub fn get_callers(&self, symbol: &str) -> Option<&Vec<String>>
@acp:summary “Get callers of a symbol from reverse call graph”
Sourcepub fn get_callees(&self, symbol: &str) -> Option<&Vec<String>>
pub fn get_callees(&self, symbol: &str) -> Option<&Vec<String>>
@acp:summary “Get callees of a symbol from forward call graph”
Sourcepub fn get_domain_files(&self, domain: &str) -> Option<&Vec<String>>
pub fn get_domain_files(&self, domain: &str) -> Option<&Vec<String>>
@acp:summary “Get all files in a domain”
Sourcepub fn update_stats(&mut self)
pub fn update_stats(&mut self)
@acp:summary “Recalculate statistics after indexing”
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cache
impl<'de> Deserialize<'de> for Cache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more