Enum strason::parser::ErrorType [] [src]

pub enum ErrorType {
    Syntax(String),
    MissingField(&'static str),
    UnknownField(String),
    ExpectedString,
    UnexpectedEOF,
    UnexpectedCharacter(char),
    MalformedNumber,
    MalformedEscape,
    UnknownIdent,
    Unicode(ParseIntError),
    Utf16(Cow<'static, str>),
    Io(Error),
}

The type of a Json parsing error

Variants

Syntax(String)

Syntax error interpreting Json

MissingField(&'static str)

Missing field interpreting Json

UnknownField(String)

Unknown field

ExpectedString

Expected a string, got something else

UnexpectedEOF

end-of-file reached before json was complete

UnexpectedCharacter(char)

bad character encountered when parsing some data

MalformedNumber

a number contained a bad or misplaced character

MalformedEscape

an escape sequence was invalid

UnknownIdent

an identifier was given that has no meaning

Unicode(ParseIntError)

a unicode codepoint constant was malformed

Utf16(Cow<'static, str>)

a series of codepoints could not be parsed as utf16

Io(Error)

some sort of IO error

Trait Implementations

impl Debug for ErrorType
[src]

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

Formats the value using the given formatter.

impl From<ParseIntError> for ErrorType
[src]

fn from(e: ParseIntError) -> ErrorType

Performs the conversion.

impl From<Cow<'static, str>> for ErrorType
[src]

fn from(e: Cow<'static, str>) -> ErrorType

Performs the conversion.

impl From<Error> for ErrorType
[src]

fn from(e: Error) -> ErrorType

Performs the conversion.