1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum SystemdError {
5 #[error(transparent)]
6 ZbusError(#[from] zbus::Error),
7
8 #[error("Systemd unit not found: {unit}")]
9 UnitNotFound { unit: String },
10
11 #[error("Invalid value for SystemdUnitFileState: {state}")]
12 InvalidUnitFileState { state: String },
13 #[error("Invalid value for SystemdActiveState: {state}")]
14 InvalidUnitActiveState { state: String },
15 #[error("Invalid value for SystemdLoadState: {state}")]
16 InvalidUnitLoadState { state: String },
17}