diff options
author | 2024-12-22 18:58:28 +0000 | |
---|---|---|
committer | 2024-12-22 18:58:28 +0000 | |
commit | 6385e43e8ca467e53c6a705a932016c5af75c3a2 (patch) | |
tree | f63fb7bd9a349f24b093ba4dd037c6ce7789f5ee /jabber/src/error.rs | |
parent | 595d165479b8b12e456f39205d8433b822b07487 (diff) | |
download | luz-6385e43e8ca467e53c6a705a932016c5af75c3a2.tar.gz luz-6385e43e8ca467e53c6a705a932016c5af75c3a2.tar.bz2 luz-6385e43e8ca467e53c6a705a932016c5af75c3a2.zip |
implement sink and stream with tokio::spawn
Diffstat (limited to 'jabber/src/error.rs')
-rw-r--r-- | jabber/src/error.rs | 8 |
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) |