Enum json::JsonError [] [src]

pub enum JsonError {
    UnexpectedToken(String),
    UnexpectedCharacter(char),
    UnexpectedEndOfJson,
    CantCastCodepointToCharacter(u32),
    ArrayIndexOutOfBounds,
    WrongType(String),
    UndefinedField(String),
}

Variants

UnexpectedToken(String)UnexpectedCharacter(char)UnexpectedEndOfJsonCantCastCodepointToCharacter(u32)ArrayIndexOutOfBoundsWrongType(String)UndefinedField(String)

Methods

impl JsonError
[src]

fn unexpected_token(token: Token) -> Self

fn wrong_type(expected: &str) -> Self

fn undefined(field: &str) -> Self

Trait Implementations

impl Debug for JsonError
[src]

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

Formats the value using the given formatter.

impl Display for JsonError
[src]

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

Formats the value using the given formatter.

impl Error for JsonError
[src]

fn description(&self) -> &str

A short description of the error. Read more

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

The lower-level cause of this error, if any. Read more