#[non_exhaustive]pub enum DeterministicCborError {
Show 26 variants
TrailingBytes,
UnexpectedEnd,
InputTooLarge,
OutputTooLarge,
OffsetOverflow,
LengthTooLarge,
NegativeIntegerOutOfRange,
NegativeIntegerMustBeNegative,
NonCanonicalInteger,
TruncatedArgument,
TruncatedBytes,
InvalidUtf8,
UnsupportedMapKeyType,
DuplicateMapKey,
MapKeysOutOfOrder,
UnsupportedSimpleValue,
UnsupportedMajorType,
UnsupportedAdditionalInfo,
DepthExceeded,
NodeLimitExceeded,
ContainerEntriesExceeded,
AggregateTextBytesExceeded,
AggregateByteStringBytesExceeded,
ContainerLengthExceedsInput,
PreflightLengthMismatch,
AllocationFailure,
}Expand description
Error returned by deterministic generic-CBOR encoding and decoding.
Variants intentionally carry no caller text, byte strings, or raw input. This keeps FFI and SDK error mapping deterministic and prevents accidental PII disclosure in logs or telemetry.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TrailingBytes
Extra bytes remain after decoding the top-level value.
UnexpectedEnd
Input ended before the current value was fully decoded.
InputTooLarge
The encoded input exceeded the deterministic-CBOR boundary cap.
OutputTooLarge
Encoding would exceed the deterministic-CBOR output cap.
OffsetOverflow
Computing a buffer offset, length, or capacity would overflow.
LengthTooLarge
A declared length does not fit in the current platform’s usize.
NegativeIntegerOutOfRange
A negative integer is outside the supported i64::MIN..=-1 range.
NegativeIntegerMustBeNegative
A negative-integer semantic value was zero or positive.
NonCanonicalInteger
An integer or length used a longer-than-minimal encoding.
TruncatedArgument
The numeric argument bytes were truncated.
TruncatedBytes
A byte or text string ended before its declared length was read.
InvalidUtf8
A text string contained bytes that are not valid UTF-8.
UnsupportedMapKeyType
A map key used a type outside the supported deterministic-CBOR key set.
DuplicateMapKey
A map contained the same semantic key more than once.
MapKeysOutOfOrder
Map keys were not in RFC 8949 deterministic order.
UnsupportedSimpleValue
A CBOR simple value outside false, true, or null was found.
UnsupportedMajorType
A CBOR major type outside the supported profile was found.
UnsupportedAdditionalInfo
Indefinite length or another unsupported additional-info value appeared.
DepthExceeded
Nesting exceeded the deterministic-CBOR profile limit.
NodeLimitExceeded
The semantic node count exceeded the deterministic-CBOR profile limit.
ContainerEntriesExceeded
A single array or map exceeded the per-container entry limit.
AggregateTextBytesExceeded
Aggregate UTF-8 text bytes exceeded the deterministic-CBOR profile cap.
AggregateByteStringBytesExceeded
Aggregate byte-string bytes exceeded the deterministic-CBOR profile cap.
ContainerLengthExceedsInput
A declared container length is larger than the remaining input can hold.
PreflightLengthMismatch
Encoder preflight and emission disagreed, which indicates an internal bug.
AllocationFailure
A bounded internal owner could not reserve its required allocation.
Trait Implementations§
Source§impl Clone for DeterministicCborError
impl Clone for DeterministicCborError
Source§fn clone(&self) -> DeterministicCborError
fn clone(&self) -> DeterministicCborError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeterministicCborError
Source§impl Debug for DeterministicCborError
impl Debug for DeterministicCborError
Source§impl Display for DeterministicCborError
impl Display for DeterministicCborError
impl Eq for DeterministicCborError
Source§impl Error for DeterministicCborError
impl Error for DeterministicCborError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()