#[non_exhaustive]pub enum DecodeErrorKind {
Show 14 variants
UnexpectedEnd,
TrailingBytes,
NotShortest,
IndefiniteLength,
Reserved,
Float,
SimpleValue,
InvalidUtf8,
InvalidMapKey,
UnsortedKeys,
DuplicateKey,
UnsupportedTag,
InvalidTagContent,
TooDeep,
}Expand description
The reasons why input is rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedEnd
The input ends in the middle of a data item, or a length is longer than the rest of the input.
TrailingBytes
There are bytes after the end of the value.
NotShortest
A number, length or tag is not in its shortest form.
IndefiniteLength
A byte string, text string, array or map has an indefinite length.
Reserved
A header uses reserved additional information (28 to 30).
Float
A floating-point number.
SimpleValue
A simple value other than false, true and null.
InvalidUtf8
A text string is not valid UTF-8.
InvalidMapKey
A map key is neither an integer nor a text string.
UnsortedKeys
A map key is not greater than the key before it.
DuplicateKey
A map key appears twice.
UnsupportedTag
A tag other than the decimal fraction (4) and the UUID (37).
InvalidTagContent
A tag’s content does not have the shape the tag requires.
TooDeep
Arrays and maps are nested more than MAX_DEPTH levels deep.
Trait Implementations§
Source§impl Clone for DecodeErrorKind
impl Clone for DecodeErrorKind
Source§impl Debug for DecodeErrorKind
impl Debug for DecodeErrorKind
Source§impl Display for DecodeErrorKind
impl Display for DecodeErrorKind
impl Eq for DecodeErrorKind
Source§impl PartialEq for DecodeErrorKind
impl PartialEq for DecodeErrorKind
impl StructuralPartialEq for DecodeErrorKind
Auto Trait Implementations§
impl Forget for DecodeErrorKind
impl Freeze for DecodeErrorKind
impl Move for DecodeErrorKind
impl RefUnwindSafe for DecodeErrorKind
impl Send for DecodeErrorKind
impl Sync for DecodeErrorKind
impl Unpin for DecodeErrorKind
impl UnsafeUnpin for DecodeErrorKind
impl UnwindSafe for DecodeErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more