pub enum CanonicalCodecError {
Show 20 variants
DocumentTooLarge {
actual: usize,
maximum: usize,
},
StringTooLarge {
actual: usize,
maximum: usize,
},
BytesTooLarge {
actual: usize,
maximum: usize,
},
TooManyEntries {
kind: CollectionKind,
actual: usize,
maximum: usize,
},
NestingTooDeep {
depth: usize,
maximum: usize,
},
UnsupportedVersion {
version: u8,
},
UnknownTag {
tag: u8,
},
VectorDimensionOutOfRange {
actual: u32,
maximum: u32,
},
NonCanonicalVectorComponent {
index: usize,
},
InvalidBoolean {
value: u8,
},
InvalidDecimal,
InvalidCurrency,
InvalidTimestamp,
InvalidUtf8,
NonCanonicalRecordOrder,
ZeroEnumTypeId,
ZeroEnumVariantId,
ZeroFieldId,
UnexpectedEnd,
TrailingBytes {
count: usize,
},
}Expand description
A safe canonical encoding or decoding failure.
Variants§
DocumentTooLarge
The document exceeds the hard encoded-size limit.
StringTooLarge
A string exceeds its hard byte-length limit.
Fields
BytesTooLarge
A byte value exceeds its hard length limit.
TooManyEntries
A list or record exceeds its hard entry limit.
Fields
kind: CollectionKindCollection kind.
NestingTooDeep
The value graph exceeds the hard nesting-depth limit.
Fields
UnsupportedVersion
The first byte is not a supported encoding version.
UnknownTag
The type tag is not registered in encoding v1.
VectorDimensionOutOfRange
A vector payload declares a dimension outside 1..=MAX_VECTOR_DIMENSION.
NonCanonicalVectorComponent
A vector payload carries a non-canonical component (NaN, infinity, or the negative-zero bit pattern).
InvalidBoolean
A Boolean payload is neither zero nor one.
InvalidDecimal
A decimal specification or coefficient is invalid.
InvalidCurrency
A money currency is not three uppercase ASCII bytes.
InvalidTimestamp
Timestamp nanoseconds are outside the accepted range.
InvalidUtf8
A string payload is not valid UTF-8.
NonCanonicalRecordOrder
Record fields are duplicated or not in strictly increasing ID order.
ZeroEnumTypeId
An enum payload contains the reserved zero enum-type ID.
ZeroEnumVariantId
An enum payload contains the reserved zero variant ID.
ZeroFieldId
A record payload contains the reserved zero field ID.
UnexpectedEnd
The document ended before the declared value was complete.
TrailingBytes
Bytes remain after the first complete value.
Trait Implementations§
Source§impl Clone for CanonicalCodecError
impl Clone for CanonicalCodecError
Source§impl Debug for CanonicalCodecError
impl Debug for CanonicalCodecError
Source§impl Display for CanonicalCodecError
impl Display for CanonicalCodecError
impl Eq for CanonicalCodecError
Source§impl Error for CanonicalCodecError
impl Error for CanonicalCodecError
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()