From 6385e43e8ca467e53c6a705a932016c5af75c3a2 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sun, 22 Dec 2024 18:58:28 +0000 Subject: implement sink and stream with tokio::spawn --- jabber/src/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'jabber/src/error.rs') 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 for Error { } } +impl From for Error { + fn from(e: JoinError) -> Self { + Self::JoinError(e) + } +} + impl From for Error { fn from(e: peanuts::DeserializeError) -> Self { Error::Deserialization(e) -- cgit