Expand description
Cache::lookup per CACHE-014..CACHE-016, plus
Cache::lookup_status for AUX-015 step 11.
Cache::lookup returns Some(Manifest) only if every
check on the entry passes; any failure (manifest missing,
manifest unparseable, schema-version mismatch, hash-function
mismatch, output blob missing, output blob size mismatch,
captured stream missing, captured stream size mismatch) yields
None.
Cache::lookup_status is the introspecting variant haz why
needs: it preserves the same miss conditions but discriminates
them into the four AUX-015 step 11 sub-states
(CacheLookupStatus::Hit,
CacheLookupStatus::MissNoEntry,
CacheLookupStatus::MissSchemaMismatch,
CacheLookupStatus::MissCorruptEntry). Unlike
Cache::lookup, filesystem errors that are NOT the spec’s
“missing entry” shape surface as
CacheLookupError::Io.
CACHE-016 is explicit that a miss “MUST NOT raise an error
to the caller”, so Cache::lookup’s return type stays
Option<Manifest> rather than Result<Option<_>, _>. The
introspecting Cache::lookup_status obeys the same
semantics for the enumerated misses; it lifts only the truly
unexpected IO failures into CacheLookupError.
Enums§
- Cache
Lookup Error - Failure modes for
Cache::lookup_status. - Cache
Lookup Status - Discriminated outcome of
Cache::lookup_statusperAUX-015step 11.