aboutsummaryrefslogtreecommitdiffstats
path: root/lampada/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-03-26 19:13:10 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2025-03-26 19:13:10 +0000
commit8c239e5c7a49cff350104b09cbb74d862c2ec420 (patch)
tree4b392f1ffa6b91fadf68b4a7f67ad5f901fbeda4 /lampada/src/lib.rs
parent410fe3af16be5985c868b00908b8ddf4ed6e469d (diff)
downloadluz-8c239e5c7a49cff350104b09cbb74d862c2ec420.tar.gz
luz-8c239e5c7a49cff350104b09cbb74d862c2ec420.tar.bz2
luz-8c239e5c7a49cff350104b09cbb74d862c2ec420.zip
feat: stream error handling
Diffstat (limited to 'lampada/src/lib.rs')
-rw-r--r--lampada/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lampada/src/lib.rs b/lampada/src/lib.rs
index c61c596..a01ba06 100644
--- a/lampada/src/lib.rs
+++ b/lampada/src/lib.rs
@@ -15,6 +15,7 @@ use stanza::client::{
iq::{self, Iq, IqType},
Stanza,
};
+use stanza::stream::Error as StreamError;
use tokio::{
sync::{mpsc, oneshot, Mutex},
task::JoinSet,
@@ -59,12 +60,16 @@ pub trait Logic {
connection: Connected,
) -> impl std::future::Future<Output = ()> + Send;
+ fn handle_stream_error(
+ self,
+ stream_error: StreamError,
+ ) -> impl std::future::Future<Output = ()> + Send;
+
/// run to handle an incoming xmpp stanza
fn handle_stanza(
self,
stanza: Stanza,
connection: Connected,
- supervisor: SupervisorSender,
) -> impl std::future::Future<Output = ()> + std::marker::Send;
/// run to handle a command message when a connection is currently established