1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#![allow(missing_docs)]
#[derive(Fail, Debug)]
pub enum Error {
#[fail(display = "I/O error")]
Io(#[cause] ::std::io::Error),
#[fail(display = "UTF8 error")]
Utf8(#[cause] ::std::str::Utf8Error),
#[fail(display = "Unexpected EOF during reading {}.", _0)]
UnexpectedEof(String),
#[fail(display = "Expecting </{}> found </{}>", expected, found)]
EndEventMismatch { expected: String, found: String },
#[fail(display = "Unexpected token '{}'", _0)]
UnexpectedToken(String),
#[fail(display = "Only Comment, CDATA and DOCTYPE nodes can start with a '!'")]
UnexpectedBang,
#[fail(display = "Cannot read text, expecting Event::Text")]
TextNotFound,
#[fail(
display = "XmlDecl must start with 'version' attribute, found {:?}",
_0
)]
XmlDeclWithoutVersion(Option<String>),
#[fail(
display = "error while parsing attribute at position {}: Attribute key cannot contain quote.",
_0
)]
NameWithQuote(usize),
#[fail(
display = "error while parsing attribute at position {}: Attribute key must be directly followed by = or space",
_0
)]
NoEqAfterName(usize),
#[fail(
display = "error while parsing attribute at position {}: Attribute value must start with a quote.",
_0
)]
UnquotedValue(usize),
#[fail(
display = "error while parsing attribute at position {}: Duplicate attribute at position {} and {}",
_0,
_1,
_0
)]
DuplicatedAttribute(usize, usize),
#[fail(display = "{}", _0)]
EscapeError(#[cause] ::escape::EscapeError),
}
pub type Result<T> = ::std::result::Result<T, Error>;