aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 8cb6496..f117e82 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -13,8 +13,11 @@ pub enum Error {
TlsRequired,
AlreadyTls,
Unsupported,
+ NoLocalpart,
+ AlreadyConnecting,
UnexpectedElement(peanuts::Element),
XML(peanuts::Error),
+ Deserialization(peanuts::DeserializeError),
SASL(SASLError),
JID(ParseError),
Authentication(Failure),
@@ -34,6 +37,12 @@ impl From<rsasl::prelude::SASLError> for Error {
}
}
+impl From<peanuts::DeserializeError> for Error {
+ fn from(e: peanuts::DeserializeError) -> Self {
+ Error::Deserialization(e)
+ }
+}
+
impl From<MechanismNameError> for Error {
fn from(e: MechanismNameError) -> Self {
Self::SASL(SASLError::MechanismName(e))