aboutsummaryrefslogtreecommitdiffstats
path: root/jabber/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'jabber/src/error.rs')
-rw-r--r--jabber/src/error.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/jabber/src/error.rs b/jabber/src/error.rs
index 6671fe6..902061e 100644
--- a/jabber/src/error.rs
+++ b/jabber/src/error.rs
@@ -5,6 +5,7 @@ use rsasl::mechname::MechanismNameError;
use stanza::client::error::Error as ClientError;
use stanza::sasl::Failure;
use stanza::stream::Error as StreamError;
+use tokio::task::JoinError;
#[derive(Debug)]
pub enum Error {
@@ -28,6 +29,7 @@ pub enum Error {
MissingError,
Disconnected,
Connecting,
+ JoinError(JoinError),
}
#[derive(Debug)]
@@ -42,6 +44,12 @@ impl From<rsasl::prelude::SASLError> for Error {
}
}
+impl From<JoinError> for Error {
+ fn from(e: JoinError) -> Self {
+ Self::JoinError(e)
+ }
+}
+
impl From<peanuts::DeserializeError> for Error {
fn from(e: peanuts::DeserializeError) -> Self {
Error::Deserialization(e)