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 Debug for CborError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Error> for CborError
[src]
impl From<Error> for CborError
impl Error for CborError
[src]
impl Error for CborError
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for CborError
[src]
impl Display for CborError