diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 13 |
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) } } |