graceful shutdown
Release / Build and Release (push) Has been cancelled

This commit is contained in:
2026-04-02 18:46:17 +02:00
parent 0617e53412
commit b18af49ac8
5 changed files with 206 additions and 63 deletions
+23
View File
@@ -18,6 +18,15 @@ pub enum FluxoError {
#[error("External system error: {0}")]
System(String),
#[error("Bluetooth error: {0}")]
Bluetooth(String),
#[error("Network error: {0}")]
Network(String),
#[error("Hardware error: {0}")]
Hardware(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
@@ -28,4 +37,18 @@ pub enum FluxoError {
Other(#[from] anyhow::Error),
}
impl FluxoError {
pub fn is_transient(&self) -> bool {
matches!(
self,
Self::Io(_)
| Self::System(_)
| Self::Bluetooth(_)
| Self::Network(_)
| Self::Hardware(_)
| Self::Module { .. }
)
}
}
pub type Result<T> = std::result::Result<T, FluxoError>;