diff options
author | 2025-03-26 19:13:10 +0000 | |
---|---|---|
committer | 2025-03-26 19:13:10 +0000 | |
commit | 8c239e5c7a49cff350104b09cbb74d862c2ec420 (patch) | |
tree | 4b392f1ffa6b91fadf68b4a7f67ad5f901fbeda4 /lampada/src/lib.rs | |
parent | 410fe3af16be5985c868b00908b8ddf4ed6e469d (diff) | |
download | luz-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.rs | 7 |
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 |