Enum serde_json::error::Error [] [src]

pub enum Error {
    SyntaxError(ErrorCodeusizeusize),
    IoError(Error),
    FromUtf8Error(FromUtf8Error),
}

This type represents all possible errors that can occur when serializing or deserializing a value into JSON.

Variants

SyntaxError(ErrorCodeusizeusize)

The JSON value had some syntatic error.

IoError(Error)

Some IO error occurred when serializing or deserializing a value.

FromUtf8Error(FromUtf8Error)

Some UTF8 error occurred while serializing or deserializing a value.

Trait Implementations

impl Debug for Error
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.

impl From<Error> for Error
[src]

fn from(error: Error) -> Error

Performs the conversion.

impl From<FromUtf8Error> for Error
[src]

fn from(error: FromUtf8Error) -> Error

Performs the conversion.

impl From<Error> for Error
[src]

fn from(error: Error) -> Error

Performs the conversion.

impl Error for Error
[src]

fn syntax(_: &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.