systemd_transient/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4#[non_exhaustive]
5pub enum SystemdTransientError {
6 #[error("job stream ended")]
7 JobStreamEnded,
8 #[error("waiting for job of unit {unit} failed with reason {reason}")]
9 JobWaitFailed { unit: String, reason: String },
10 #[error("unit {name} is already running")]
11 UnitAlreadyRunning { name: String },
12 #[error("unit {name} exists and is not transient")]
13 UnitNotTransient { name: String },
14 #[error(
15 "unit {name} is inactive but still loaded, referenced by an unreleased handle, another unit or a job"
16 )]
17 UnitStillLoaded { name: String },
18 #[error("unit {name} is not running")]
19 UnitNotRunning { name: String },
20 #[error("unit {name} was started again by someone else")]
21 UnitRestarted { name: String },
22 #[error("unit stream ended")]
23 UnitStreamEnded,
24
25 #[error(transparent)]
26 Zbus(#[from] zbus::Error),
27}