pub struct CacheManifest {
pub program_id: Option<ProgramId>,
pub modules: BTreeMap<String, ManifestEntry>,
}Expand description
Persisted manifest recording the state of a previous analysis run.
Fields§
§program_id: Option<ProgramId>Program ID from the previous run.
modules: BTreeMap<String, ManifestEntry>Per-module entries keyed by input file path.
Implementations§
Source§impl CacheManifest
impl CacheManifest
Sourcepub fn load(cache_dir: &Path) -> Self
pub fn load(cache_dir: &Path) -> Self
Load manifest from a cache directory. Returns default if not found.
Sourcepub fn save(&self, cache_dir: &Path) -> Result<(), Error>
pub fn save(&self, cache_dir: &Path) -> Result<(), Error>
Save manifest to a cache directory.
§Errors
Returns std::io::Error if the cache directory cannot be created
or the manifest file cannot be written.
fn manifest_path(cache_dir: &Path) -> PathBuf
Sourcepub fn diff(&self, current: &BTreeMap<String, String>) -> ManifestDiff
pub fn diff(&self, current: &BTreeMap<String, String>) -> ManifestDiff
Compare this manifest (previous run) against current fingerprints.
Returns lists of unchanged, changed, added, and removed input paths.
Does not check constraint-level staleness; use
diff_with_constraints for that.
Sourcepub fn diff_with_constraints(
&self,
current_fingerprints: &BTreeMap<String, String>,
current_constraint_hashes: &BTreeMap<String, String>,
) -> ManifestDiff
pub fn diff_with_constraints( &self, current_fingerprints: &BTreeMap<String, String>, current_constraint_hashes: &BTreeMap<String, String>, ) -> ManifestDiff
Compare this manifest against current fingerprints and constraint hashes.
current_fingerprints maps input path to file fingerprint.
current_constraint_hashes maps input path to constraint hash.
A file is classified as constraint_stale when its fingerprint is
unchanged but its constraint hash differs from the previous run.
Trait Implementations§
Source§impl Clone for CacheManifest
impl Clone for CacheManifest
Source§fn clone(&self) -> CacheManifest
fn clone(&self) -> CacheManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more