mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
24 lines
401 B
Rust
24 lines
401 B
Rust
|
use std::convert::From;
|
||
|
use std::io;
|
||
|
|
||
|
use minidom;
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
pub enum Error {
|
||
|
IoError(io::Error),
|
||
|
XMLError(minidom::Error),
|
||
|
ParseError(&'static str),
|
||
|
}
|
||
|
|
||
|
impl From<io::Error> for Error {
|
||
|
fn from(err: io::Error) -> Error {
|
||
|
Error::IoError(err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl From<minidom::Error> for Error {
|
||
|
fn from(err: minidom::Error) -> Error {
|
||
|
Error::XMLError(err)
|
||
|
}
|
||
|
}
|