Enum elementtree::Error
[−]
[src]
pub enum Error { MalformedXml { msg: Cow<'static, str>, pos: Position, }, Io(Error), Utf8(Utf8Error), UnexpectedEvent { msg: Cow<'static, str>, pos: Position, }, DuplicateNamespacePrefix, }
Errors that can occur parsing XML
Variants
MalformedXml
The XML is invalid
Fields of MalformedXml
msg: Cow<'static, str> | |
pos: Position |
Io(Error)
An IO Error
Utf8(Utf8Error)
A UTF-8 Error
UnexpectedEvent
This library is unable to process this XML. This can occur if, for example, the XML contains processing instructions.
Fields of UnexpectedEvent
msg: Cow<'static, str> | |
pos: Position |
DuplicateNamespacePrefix
A namespace prefix was already used
Methods
impl Error
[src]
fn position(&self) -> Option<Position>
Returns the position of the error if known
fn line(&self) -> u64
Returns the line number of the error or 0 if unknown
fn column(&self) -> u64
Returns the column of the error or 0 if unknown
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<XmlReadError> for Error
[src]
fn from(err: XmlReadError) -> Error
Performs the conversion.
impl From<XmlWriteError> for Error
[src]
fn from(err: XmlWriteError) -> Error
Performs the conversion.