Enum serde_cbor::error::Error
[−]
[src]
pub enum Error { SyntaxError(ErrorCode, usize), IoError(Error), FromUtf8Error(FromUtf8Error), // some variants omitted }
Represents all possible errors that can occur when serializing or deserializing a value.
Variants
SyntaxError(ErrorCode, usize)
The CBOR value had a syntactic error.
IoError(Error)
Some IO error occured when processing a value.
FromUtf8Error(FromUtf8Error)
Some error occured while converting a string.
Trait Implementations
impl Debug for Error
[src]
impl Error for Error
[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
impl Display for Error
[src]
impl From<Error> for Error
[src]
impl From<FromUtf8Error> for Error
[src]
fn from(error: FromUtf8Error) -> Error
Performs the conversion.
impl From<ByteorderError> for Error
[src]
fn from(error: ByteorderError) -> Error
Performs the conversion.
impl Error for Error
[src]
fn syntax(s: &str) -> Error
Raised when there is general error when deserializing a type.
fn end_of_stream() -> Error
Raised when a Deserialize
type unexpectedly hit the end of the stream.
fn unknown_field(field: &str) -> Error
Raised when a Deserialize
struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> Error
Raised when a Deserialize
struct type did not receive a field.
fn length_mismatch(_len: usize) -> Self
Raised when a fixed sized sequence or map was passed in the wrong amount of arguments.
fn type_mismatch(_type: Type) -> Self
Raised when a Deserialize
was passed an incorrect type.
fn invalid_value(msg: &str) -> Self
Raised when a Deserialize
was passed an incorrect value.