Enum cbor4ii::core::error::DecodeError
source · #[non_exhaustive]pub enum DecodeError<E> {
Read(E),
Mismatch {
name: StaticStr,
found: u8,
},
Unsupported {
name: StaticStr,
found: u8,
},
Eof {
name: StaticStr,
expect: Len,
},
RequireLength {
name: StaticStr,
found: Len,
},
RequireBorrowed {
name: StaticStr,
},
RequireUtf8 {
name: StaticStr,
},
LengthOverflow {
name: StaticStr,
found: Len,
},
CastOverflow {
name: StaticStr,
},
ArithmeticOverflow {
name: StaticStr,
ty: ArithmeticOverflow,
},
DepthOverflow {
name: StaticStr,
},
}
Expand description
Decode Error
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.
Read(E)
Mismatch
Unsupported
Eof
RequireLength
RequireBorrowed
RequireUtf8
LengthOverflow
CastOverflow
ArithmeticOverflow
DepthOverflow
Trait Implementations§
source§impl<E: Debug> Debug for DecodeError<E>
impl<E: Debug> Debug for DecodeError<E>
source§impl<E: Debug> Display for DecodeError<E>
impl<E: Debug> Display for DecodeError<E>
source§impl<E: Error + 'static> Error for DecodeError<E>
impl<E: Error + 'static> Error for DecodeError<E>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<E> From<DecodeError<E>> for DecodeError<E>
impl<E> From<DecodeError<E>> for DecodeError<E>
source§fn from(err: Error<E>) -> DecodeError<E>
fn from(err: Error<E>) -> DecodeError<E>
Converts to this type from the input type.
source§impl<E> From<E> for DecodeError<E>
impl<E> From<E> for DecodeError<E>
source§fn from(err: E) -> DecodeError<E>
fn from(err: E) -> DecodeError<E>
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> RefUnwindSafe for DecodeError<E>where
E: RefUnwindSafe,
impl<E> Send for DecodeError<E>where
E: Send,
impl<E> Sync for DecodeError<E>where
E: Sync,
impl<E> Unpin for DecodeError<E>where
E: Unpin,
impl<E> UnwindSafe for DecodeError<E>where
E: UnwindSafe,
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