pub struct EntryMeta {
pub cache_key: String,
pub key_schema: u32,
pub crate_name: String,
pub crate_types: Vec<String>,
pub files: Vec<CachedFile>,
pub stdout: String,
pub stderr: String,
pub features: Vec<String>,
pub target: String,
pub profile: String,
pub compile_time_ms: u64,
pub emit_kinds: Vec<String>,
}Expand description
Metadata stored alongside cached artifacts.
Fields§
§cache_key: String§key_schema: u32Cache-key recipe version that produced cache_key.
Entries written before this field existed deserialize as 0 (unknown),
so an explicit stale-schema sweep can reclaim them without making old
stores unreadable during an ordinary upgrade.
crate_name: String§crate_types: Vec<String>§files: Vec<CachedFile>§stdout: String§stderr: String§features: Vec<String>§target: String§profile: String§compile_time_ms: u64§emit_kinds: Vec<String>Canonical rustc --emit kinds this entry actually contains, derived
from the stored output files at put time (kunobi-ninja/kache#325). Lookup
uses it to reject an entry that doesn’t cover what the invocation’s
--emit requested. #[serde(default)] keeps pre-gate meta.json (no
field) deserializable — an empty set means “unknown”, so the lookup gate
skips the check rather than mass-invalidating old entries.
Implementations§
Source§impl EntryMeta
impl EntryMeta
Sourcepub fn covers_requested_emit(&self, requested: &[String]) -> bool
pub fn covers_requested_emit(&self, requested: &[String]) -> bool
Whether this entry’s recorded outputs cover every --emit kind the
caller requested (kunobi-ninja/kache#325). Superset-tolerant: an entry
that contains more kinds than requested still covers it (a lib
--emit=link legitimately also produces .rmeta).
Returns true when emit_kinds is empty — pre-gate entries recorded no
coverage, so the check is skipped rather than mass-invalidating them.
Requested kinds that map to no stored file class (e.g. an exotic emit
kache doesn’t model) are ignored so the gate never rejects on a kind it
can’t reason about.