pub struct ResultCacheEntry {
pub schema_version: u32,
pub env_digest: String,
pub input_digests: Vec<String>,
pub definition_digest: String,
pub check_name: String,
pub evidence_digest: String,
pub body: CiVerdictBody,
pub combined_output: String,
pub attempts: u32,
pub attempt_records: Vec<AttemptRecord>,
}Expand description
A portable cached check result, bound to env, inputs, and check identity.
Fields§
§schema_version: u32Entry schema version.
env_digest: StringDigest of the content-addressed environment E.
input_digests: Vec<String>Content-addresses of the evaluated inputs.
definition_digest: StringDigest of the authored definition.
check_name: StringCheck name within that definition.
evidence_digest: StringBLAKE3 of the captured output (logs are not the cache key).
body: CiVerdictBodyReusable verdict body (a cache hit is a verdict).
combined_output: StringANSI-stripped combined output reused on a hit.
attempts: u32Attempt count from the original run.
attempt_records: Vec<AttemptRecord>Operational attempt records; not part of the signed body.
Implementations§
Source§impl ResultCacheEntry
impl ResultCacheEntry
Sourcepub fn from_result(
key: &CacheKey,
check_name: &str,
result: &CheckResult,
) -> Self
pub fn from_result( key: &CacheKey, check_name: &str, result: &CheckResult, ) -> Self
Build a portable entry from a completed check result.
Sourcepub fn into_check_result(self) -> CheckResult
pub fn into_check_result(self) -> CheckResult
Reconstruct the executor result reused on a cache hit.
Sourcepub fn verify_fresh(&self, fresh: &CheckResult) -> Result<(), ResultCacheError>
pub fn verify_fresh(&self, fresh: &CheckResult) -> Result<(), ResultCacheError>
Fail-closed comparison of a cached entry against a fresh run.
Trait Implementations§
Source§impl Clone for ResultCacheEntry
impl Clone for ResultCacheEntry
Source§fn clone(&self) -> ResultCacheEntry
fn clone(&self) -> ResultCacheEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResultCacheEntry
impl Debug for ResultCacheEntry
Source§impl<'de> Deserialize<'de> for ResultCacheEntry
impl<'de> Deserialize<'de> for ResultCacheEntry
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ResultCacheEntry
Source§impl PartialEq for ResultCacheEntry
impl PartialEq for ResultCacheEntry
Source§impl Serialize for ResultCacheEntry
impl Serialize for ResultCacheEntry
impl StructuralPartialEq for ResultCacheEntry
Auto Trait Implementations§
impl Freeze for ResultCacheEntry
impl RefUnwindSafe for ResultCacheEntry
impl Send for ResultCacheEntry
impl Sync for ResultCacheEntry
impl Unpin for ResultCacheEntry
impl UnsafeUnpin for ResultCacheEntry
impl UnwindSafe for ResultCacheEntry
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
Mutably borrows from an owned value. Read more