aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/logic/connection_error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/logic/connection_error.rs')
-rw-r--r--filamento/src/logic/connection_error.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/filamento/src/logic/connection_error.rs b/filamento/src/logic/connection_error.rs
new file mode 100644
index 0000000..ac9e931
--- /dev/null
+++ b/filamento/src/logic/connection_error.rs
@@ -0,0 +1,12 @@
+use lampada::error::ConnectionError;
+
+use crate::UpdateMessage;
+
+use super::ClientLogic;
+
+pub async fn handle_connection_error(logic: ClientLogic, error: ConnectionError) {
+ logic
+ .update_sender()
+ .send(UpdateMessage::Error(error.into()))
+ .await;
+}