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

pub enum Error {
    SyntaxError(ErrorCode, usize, usize),
    IoError(Error),
    FromUtf8Error(FromUtf8Error),
}

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

Variants

SyntaxError

The JSON value had some syntatic error.

IoError

Some IO error occurred when serializing or deserializing a value.

FromUtf8Error

Some UTF8 error occurred while serializing or deserializing a value.

Trait Implementations

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

impl Display for Error

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

impl From<Error> for Error

fn from(error: Error) -> Error

impl From<FromUtf8Error> for Error

fn from(error: FromUtf8Error) -> Error

impl From<Error> for Error

fn from(error: Error) -> Error

impl Error for Error

fn syntax(_: &str) -> Error

fn end_of_stream() -> Error

fn unknown_field(field: &str) -> Error

fn missing_field(field: &'static str) -> Error

fn length_mismatch(_len: usize) -> Self

fn type_mismatch(_type: Type) -> Self

fn invalid_value(msg: &str) -> Self

Derived Implementations

impl Debug for Error

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