b0VIM 7.4 ��U���d� erickt Erick-Tryzelaar-MBP.local ~erickt/projects/rust/serde/serde/serde_json/src/error.rs
3210 #"! U tp V g W ad { V � � � � � � � x \ G . � � � � � � j S 4 �
�
�
�
�
w
a
<
"
� � � � � � � � a & � � B �
�
K
� { , � � B � � c � h ' � � E � � $ � � D � � K � � � � � � � � { z SyntaxError(ErrorCode, usize, usize), /// msg, line, col pub enum Error { #[derive(Debug)] } } } ErrorCode::UnrecognizedHex => "invalid \\u escape (unrecognized hex)".fmt(f), ErrorCode::UnknownVariant => "unknown variant".fmt(f), //ErrorCode::UnexpectedName(ref name) => write!(f, "unexpected name {}", name), ErrorCode::UnexpectedEndOfHexEscape => "unexpected end of hex escape".fmt(f), ErrorCode::TrailingCharacters => "trailing characters".fmt(f), ErrorCode::NotUtf8 => "contents not utf-8".fmt(f), ErrorCode::NotFourDigit => "invalid \\u escape (not four digits)".fmt(f), ErrorCode::MissingField(ref field) => write!(f, "missing field \"{}\"", field), ErrorCode::UnknownField(ref field) => write!(f, "unknown field \"{}\"", field), ErrorCode::LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape".fmt(f), ErrorCode::KeyMustBeAString => "key must be a string".fmt(f), ErrorCode::InvalidUnicodeCodePoint => "invalid unicode code point".fmt(f), ErrorCode::InvalidNumber => "invalid number".fmt(f), ErrorCode::InvalidEscape => "invalid escape".fmt(f), //ErrorCode::ExpectedTokens(ref token, tokens) => write!(f, "expected {}, found {}", tokens, token), ErrorCode::ExpectedSomeValue => "expected value".fmt(f), ErrorCode::ExpectedSomeIdent => "expected ident".fmt(f), ErrorCode::ExpectedObjectCommaOrEnd => "expected `,` or `}`".fmt(f), ErrorCode::ExpectedName => "expected name".fmt(f), ErrorCode::ExpectedListCommaOrEnd => "expected `,` or `]`".fmt(f), ErrorCode::ExpectedEnumVariantString => "expected variant".fmt(f), ErrorCode::ExpectedEnumToken => "expected enum token".fmt(f), ErrorCode::ExpectedEnumMapStart => "expected enum map start".fmt(f), ErrorCode::ExpectedEnumEndToken => "expected enum map end".fmt(f), ErrorCode::ExpectedEnumEnd => "expected enum end".fmt(f), ErrorCode::ExpectedConversion => "expected conversion".fmt(f), ErrorCode::ExpectedColon => "expected `:`".fmt(f), ErrorCode::EOFWhileParsingValue => "EOF While parsing value".fmt(f), ErrorCode::EOFWhileParsingString => "EOF While parsing string".fmt(f), ErrorCode::EOFWhileParsingObject => "EOF While parsing object".fmt(f), ErrorCode::EOFWhileParsingList => "EOF While parsing list".fmt(f), //ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {}", token), match *self { use std::fmt::Debug; fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { impl fmt::Debug for ErrorCode { } UnrecognizedHex, UnknownVariant, UnexpectedEndOfHexEscape, TrailingCharacters, NotUtf8, NotFourDigit, MissingField(&'static str), UnknownField(String), LoneLeadingSurrogateInHexEscape, KeyMustBeAString, InvalidUnicodeCodePoint, InvalidNumber, InvalidEscape, ExpectedSomeValue, ExpectedSomeIdent, ExpectedObjectCommaOrEnd, ExpectedName, ExpectedListCommaOrEnd, ExpectedEnumVariantString, ExpectedEnumToken, ExpectedEnumMapStart, ExpectedEnumEndToken, ExpectedEnumEnd, ExpectedConversion, ExpectedColon, EOFWhileParsingValue, EOFWhileParsingString, EOFWhileParsingObject, EOFWhileParsingList, pub enum ErrorCode { #[derive(Clone, PartialEq)] /// The errors that can arise while parsing a JSON stream. use serde::de; use std::result; use std::io; use std::fmt; use std::error; ad � v g � � � � � � j c a ` B � � x 8 ) �
�
�
�
�
~
O
9
� � � � � � � } g . � � � @ �
�
�
�
o
a
R
� � � � � � � � b D > < ; � � � W I � � � W I
� � � � � � � @ : 9 � � � � T N M � � � � � v u pub type Result<T> = result::Result<T, Error>; /// Helper alias for `Result` objects that return a JSON `Error`. } } Error::MissingFieldError(field) fn missing_field(field: &'static str) -> Error { } Error::SyntaxError(ErrorCode::UnknownField(field.to_string()), 0, 0) fn unknown_field(field: &str) -> Error { } Error::SyntaxError(ErrorCode::EOFWhileParsingValue, 0, 0) fn end_of_stream() -> Error { } Error::SyntaxError(ErrorCode::ExpectedSomeValue, 0, 0) fn syntax(_: &str) -> Error { impl de::Error for Error { } } } } de::Error::missing_field(field) de::value::Error::MissingFieldError(field) => { } Error::SyntaxError(ErrorCode::UnknownField(field), 0, 0) de::value::Error::UnknownFieldError(field) => { } de::Error::end_of_stream() de::value::Error::EndOfStreamError => { } Error::SyntaxError(ErrorCode::ExpectedSomeValue, 0, 0) de::value::Error::SyntaxError => { match error { fn from(error: de::value::Error) -> Error { impl From<de::value::Error> for Error { } } Error::IoError(error) fn from(error: io::Error) -> Error { impl From<io::Error> for Error { } } } */