Enum cbor::CborError
[−]
[src]
pub enum CborError { Io(Error), Decode(ReadError), Encode(WriteError), AtOffset { kind: ReadError, offset: usize, }, UnexpectedEOF, }
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 of AtOffset
kind: ReadError | The exact read error. |
offset: usize | The byte offset at which the error occurred. |
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
impl Debug for CborError
[src]
impl From<Error> for CborError
[src]
impl Error for CborError
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more