systemd-transient 0.2.0

Start transient systemd services using dbus, just like systemd-run.
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
#[non_exhaustive]
pub enum SystemdTransientError {
  #[error("job stream ended")]
  JobStreamEnded,
  #[error("waiting for job of unit {unit} failed with reason {reason}")]
  JobWaitFailed { unit: String, reason: String },
  #[error("unit {name} is already running")]
  UnitAlreadyRunning { name: String },
  #[error("unit {name} exists and is not transient")]
  UnitNotTransient { name: String },
  #[error(
    "unit {name} is inactive but still loaded, referenced by an unreleased handle, another unit or a job"
  )]
  UnitStillLoaded { name: String },
  #[error("unit {name} is not running")]
  UnitNotRunning { name: String },
  #[error("unit {name} was started again by someone else")]
  UnitRestarted { name: String },
  #[error("unit stream ended")]
  UnitStreamEnded,

  #[error(transparent)]
  Zbus(#[from] zbus::Error),
}