processmanager 0.6.0

manage process lifecycles, graceful shutdown and process faults
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt::{Display, Formatter};

#[derive(Debug)]
pub enum RuntimeError {
    Internal { message: String },
    TerminationSignal,
}

impl Display for RuntimeError {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        match self {
            RuntimeError::Internal { message } => write!(f, "internal error: {message}"),
            RuntimeError::TerminationSignal => write!(f, "process termination requested"),
        }
    }
}

impl ::std::error::Error for RuntimeError {}