pub enum DaemonError {
Show 14 variants
Config(String),
Init(String),
Runtime(String),
Shutdown(String),
ShutdownTimeout(Duration),
HealthCheck(String),
ResourceLimit {
resource: String,
limit: u64,
actual: u64,
},
PolicyViolation(String),
Signal(String),
NotFound(String),
State(String),
Io(Error),
Serialization(String),
Internal(String),
}Expand description
Comprehensive error type for daemon operations.
Following Iron Lotus principle of explicit error handling, this enum covers all failure modes without panics.
Variants§
Config(String)
Configuration error during daemon initialization.
Init(String)
Initialization failed.
Runtime(String)
Runtime error during daemon execution.
Shutdown(String)
Shutdown error.
ShutdownTimeout(Duration)
Shutdown timed out.
HealthCheck(String)
Health check failed.
ResourceLimit
Resource limit exceeded.
Fields
PolicyViolation(String)
Policy violation.
Signal(String)
Signal handling error.
NotFound(String)
Daemon not found.
State(String)
Invalid state for operation.
Io(Error)
I/O error.
Serialization(String)
Serialization error.
Internal(String)
Internal error (should not occur in production).
Implementations§
Source§impl DaemonError
impl DaemonError
Sourcepub fn health_check(msg: impl Into<String>) -> Self
pub fn health_check(msg: impl Into<String>) -> Self
Creates a health check error.
Sourcepub fn policy_violation(msg: impl Into<String>) -> Self
pub fn policy_violation(msg: impl Into<String>) -> Self
Creates a policy violation error.
Sourcepub const fn is_recoverable(&self) -> bool
pub const fn is_recoverable(&self) -> bool
Returns true if this error is recoverable (daemon can continue).
Trait Implementations§
Source§impl Debug for DaemonError
impl Debug for DaemonError
Source§impl Display for DaemonError
impl Display for DaemonError
Source§impl Error for DaemonError
impl Error for DaemonError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DaemonError
impl !RefUnwindSafe for DaemonError
impl Send for DaemonError
impl Sync for DaemonError
impl Unpin for DaemonError
impl !UnwindSafe for DaemonError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more