pub enum CborError {
Io(Error),
Decode(ReadError),
Encode(WriteError),
AtOffset {
kind: ReadError,
offset: usize,
},
UnexpectedEOF,
}Expand description
Errors that can be produced by a CBOR operation.
Variants§
Io(Error)
An error as a result of an underlying IO operation.
Decode(ReadError)
An error from the type based decoder.
Encode(WriteError)
An error from the type based encoder.
AtOffset
An error reading CBOR at a particular offset.
For example, if the data in “additional information” is inconsistent with the major type.
Fields
UnexpectedEOF
EOF is found but more bytes were expected to decode the next data item.
EOF is triggered when the underlying reader returns 0 bytes.
Trait Implementations§
Source§impl Error for CborError
impl Error for CborError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Auto Trait Implementations§
impl Freeze for CborError
impl !RefUnwindSafe for CborError
impl Send for CborError
impl Sync for CborError
impl Unpin for CborError
impl !UnwindSafe for CborError
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