pub struct CompilationCache {
pub stats: CacheStats,
/* private fields */
}Expand description
The EMS compilation cache. All operations are infallible by contract: any I/O or shape problem degrades to “no cache” (law 5).
Fields§
§stats: CacheStatsImplementations§
Source§impl CompilationCache
impl CompilationCache
Sourcepub fn open(dir: &Path) -> CompilationCache
pub fn open(dir: &Path) -> CompilationCache
Open (or initialize) the cache under dir (typically
<entry dir>/.axon_cache). Never fails: a corrupt manifest, a
version mismatch, or an unreadable directory yields a fresh cache.
Sourcepub fn validation_hit(
&mut self,
module: &str,
content_hash: &str,
dep_interfaces: &BTreeMap<String, String>,
) -> bool
pub fn validation_hit( &mut self, module: &str, content_hash: &str, dep_interfaces: &BTreeMap<String, String>, ) -> bool
Law 3/4 — may this module skip re-validation? Records the
hit/miss/early-cutoff in CacheStats.
Sourcepub fn record_clean(
&mut self,
module: &str,
content_hash: &str,
dep_interfaces: BTreeMap<String, String>,
interface_hash: &str,
axi_json: &str,
)
pub fn record_clean( &mut self, module: &str, content_hash: &str, dep_interfaces: BTreeMap<String, String>, interface_hash: &str, axi_json: &str, )
Record a CLEAN validation (never a failing one — diagnostics must
re-emit from source) and persist the module’s .axi.
Sourcepub fn project_warnings(&self, key: &str) -> Option<Vec<CachedDiagnostic>>
pub fn project_warnings(&self, key: &str) -> Option<Vec<CachedDiagnostic>>
The recorded merged-gate warnings for a fully-clean project whose
key matches — Some authorizes skipping the merged revalidation
(its outcome is provably identical), None demands it re-run
(contents changed, or the previous run was not fully clean).
Sourcepub fn record_project(
&mut self,
key: &str,
merged_warnings: Vec<CachedDiagnostic>,
)
pub fn record_project( &mut self, key: &str, merged_warnings: Vec<CachedDiagnostic>, )
Record a fully-clean whole-project compile (per-module passes AND merged gate) with the merged gate’s warnings.
Sourcepub fn clear_project(&mut self)
pub fn clear_project(&mut self)
Any compile that did NOT end fully clean must drop the project entry, so the merged gate re-runs next time (soundness of the full-hit skip).
Auto Trait Implementations§
impl Freeze for CompilationCache
impl RefUnwindSafe for CompilationCache
impl Send for CompilationCache
impl Sync for CompilationCache
impl Unpin for CompilationCache
impl UnsafeUnpin for CompilationCache
impl UnwindSafe for CompilationCache
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> 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