summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-07-12 21:11:20 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2023-07-12 21:11:20 +0100
commit322b2a3b46348ec1c5acbc538de93310c9030b96 (patch)
treee447920e2414c4d3d99ce021785f0fe8103d378a /src/error.rs
parentc9683935f1e94a701be3e6efe0634dbc63c861de (diff)
downloadluz-322b2a3b46348ec1c5acbc538de93310c9030b96.tar.gz
luz-322b2a3b46348ec1c5acbc538de93310c9030b96.tar.bz2
luz-322b2a3b46348ec1c5acbc538de93310c9030b96.zip
reimplement sasl (with SCRAM!)
Diffstat (limited to '')
-rw-r--r--src/error.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs
index 7f704e5..17bfbef 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -18,6 +18,7 @@ pub enum JabberError {
NoFeatures,
UnknownNamespace,
ParseError,
+ UnexpectedEnd,
XML(quick_xml::Error),
SASL(SASLError),
Element(ElementError<'static>),
@@ -28,6 +29,8 @@ pub enum JabberError {
pub enum SASLError {
SASL(rsasl::prelude::SASLError),
MechanismName(MechanismNameError),
+ NoChallenge,
+ NoSuccess,
}
impl From<rsasl::prelude::SASLError> for JabberError {
@@ -37,8 +40,14 @@ impl From<rsasl::prelude::SASLError> for JabberError {
}
impl From<MechanismNameError> for JabberError {
- fn from(value: MechanismNameError) -> Self {
- Self::SASL(SASLError::MechanismName(value))
+ fn from(e: MechanismNameError) -> Self {
+ Self::SASL(SASLError::MechanismName(e))
+ }
+}
+
+impl From<SASLError> for JabberError {
+ fn from(e: SASLError) -> Self {
+ Self::SASL(e)
}
}