#[non_exhaustive]pub enum ErrorCode {
Show 42 variants
ParseJson,
ParseDuplicateKey,
ParseUri,
Schema,
CanonName,
CanonArgName,
CanonArgDuplicate,
CanonArgOrder,
CanonPercent,
CanonType,
CanonNumber,
CanonUnit,
CanonDate,
CanonInstant,
CanonString,
CanonBlob,
CanonHex,
CanonLicence,
CanonSet,
CanonLimit,
Slice,
PublisherMismatch,
ValidMismatch,
TimeOrder,
ArgUnknown,
ArgMissing,
KeyUnavailable,
KeyDoc,
KeyUnknown,
KeyNotValid,
Signature,
FnUnavailable,
FnHashMismatch,
ArgType,
ReturnType,
InputUnavailable,
InputInvalid,
InputUndeclared,
ValueMismatch,
BlobMismatch,
Envelope,
EvalUnavailable,
}Expand description
One variant per E_* code of SPEC 10.2, and E_EVAL_UNAVAILABLE (RS-28).
Non-exhaustive: codes added by later revisions of the specification are additions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseJson
Not strict JSON (6.1).
ParseDuplicateKey
A member name repeated in one object.
ParseUri
Not a cell URI by the outer grammar (5.1).
Schema
Missing or extra member, wrong JSON type, wrong proto, null; content for a non-blob.
CanonName
Invalid DNS name, namespace, function name, code language or key reference.
CanonArgName
Invalid or reserved argument name.
CanonArgDuplicate
An argument or asof repeated in a URI.
CanonArgOrder
URI arguments out of order, or asof not last.
CanonPercent
Non-canonical percent-encoding or non-UTF-8 bytes.
CanonType
Unknown type name, value of the wrong JSON type, or a bad valid-time declaration.
CanonNumber
Number not in canonical decimal form.
CanonUnit
A unit rule of 7.1 or units.md broken.
CanonDate
Date not YYYY-MM-DD or not a calendar day.
CanonInstant
Instant not YYYY-MM-DDTHH:MM:SS.ffffffZ or not a real time.
CanonString
Control, unassigned or surrogate code point, not NFC, or empty summary.
CanonBlob
Blob not <sha256>:<length>:<media type>.
CanonHex
Hash, key id or signature not lowercase hex of the right length.
CanonLicence
Licence neither an SPDX identifier nor an https:// URL.
CanonSet
inputs not strictly ascending.
CanonLimit
A limit from 4.5 exceeded.
Slice
A slice marker where a single cell is required.
PublisherMismatch
publisher differs from cell.ns.
ValidMismatch
valid does not echo exactly the valid-time arguments.
TimeOrder
A time-order rule broken.
ArgUnknown
An argument the function does not declare.
ArgMissing
A declared argument not bound.
The key document could not be retrieved.
KeyDoc
The key document is malformed or breaks a rule of 9.2.
KeyUnknown
The key document has no key with that id.
KeyNotValid
issued is outside the key’s validity window.
Signature
The Ed25519 signature does not verify.
No descriptor found for fn_hash.
FnHashMismatch
The descriptor does not hash to fn_hash.
ArgType
An argument’s type differs from its declaration.
ReturnType
type differs from the declared return type.
An input receipt cannot be found, or has another hash.
InputInvalid
An input receipt is not signature-valid.
InputUndeclared
An input receipt is a cell of an undeclared function.
ValueMismatch
Recomputation gives a different type or value.
BlobMismatch
Blob content has another length or hash than the blob states.
Envelope
A response envelope breaks a rule of 5.5.
The resolver could not evaluate the function (step 7.6): no runtime for its language,
a budget exceeded, or inputs the evaluator cannot obtain. Not a failure: the receipt
stays signature-valid (see crate::VerifyResult). This crate’s code, proposed for
spec-0.2.2 (DEFECTS.md RS-28); not in spec-0.2.1’s 10.2, so envelopes cannot carry it.