ReadonlycodeMachine-readable discriminant; switch on this to handle errors.
ReadonlydetailsStructured, code-specific data (see CborErrorDetails).
StaticisType guard: is value a CborError? Narrows to the
code-discriminated CborErrorTyped union.
StaticunderrunThe CBOR data ended before a complete item could be decoded.
StaticunsupportedAn unsupported/invalid value was found in a CBOR header byte.
StaticnonA numeric value was not in its shortest/canonical dCBOR form.
StaticinvalidA major-type-7 simple value other than false/true/null/float.
StaticinvalidA text string was not valid UTF-8 (with the underlying reason).
StaticnonA text string was not in Unicode NFC.
StaticunusedThe decoded item left count trailing bytes unconsumed.
StaticmisorderedMap keys were not in canonical ascending byte order.
StaticduplicateA map contained a duplicate key.
StaticmissingA requested map key was not present.
StaticoutA numeric value could not be represented in the target type.
StaticwrongThe CBOR value was not the type expected by a conversion.
StaticwrongStaticinvalidInvalid UTF-8 in a text string (with the underlying reason).
StaticinvalidInvalid ISO 8601 / RFC 3339 date string (with the underlying reason).
StaticcustomAn arbitrary error carrying a custom message.
The single error type thrown by dCBOR encoding, decoding, and extraction.
Example