pub struct VerifyResult {
pub ok: bool,
pub code: Option<ErrorCode>,
pub level: Option<Level>,
pub hash: Option<String>,
pub computed_by: Option<String>,
pub blob_checked: bool,
pub detail: String,
pub path: String,
}Expand description
The outcome of verify.
code is None when ok, with two exceptions, the codes of SPEC 10.2 that are not
failures (10.1 step 7.6):
ErrorCode::EvalUnavailable: a resolver is given and 7.1-7.5 pass butResolver::evaluationreturnsNone. The receipt is still signature-valid, so the result isok, levelLevel::Signed, withcode: Some(EvalUnavailable),path$.valueand adetail: recomputation did not happen, and the code says why.ErrorCode::InputSuperseded(spec-0.4.0): the evaluated value differs, and the evaluation’s lineage shows that an input was replaced by a later version of its cell, or a slice by other members:ok, levelSigned,path$.inputs. The receipt is historical, not wrong.
Step 7.7 still runs afterwards: if it passes, blob_checked is true and the code is kept;
if it fails, its failure replaces the code as a normal failure (ok false, its own code).
Fields§
§ok: boolWhether the receipt verified.
code: Option<ErrorCode>The failure’s code; None when ok, except ErrorCode::EvalUnavailable and
ErrorCode::InputSuperseded.
level: Option<Level>The level reached; None unless ok.
hash: Option<String>The receipt hash, once the receipt was canonical enough to compute it.
computed_by: Option<String>The receipt’s computed_by (<host>#<key id>), once steps 1-4 passed.
blob_checked: boolWhether step 7.7 ran and passed.
detail: StringA human explanation of the failure (or of a code reported with success); empty otherwise.
path: StringWhere the failure (or a code reported with success) was found; empty otherwise.