pub trait ServiceManager {
type JobSet: JobSet;
type UnitManager: UnitManager;
type UnitStatus: UnitStatus;
// Required methods
fn system_status(&self) -> Result<SystemStatus, Error>;
fn daemon_reload(&self) -> Result<(), Error>;
fn reset_failed(&self) -> Result<(), Error>;
fn unit_manager(
&self,
address: &Self::UnitStatus,
) -> Result<Self::UnitManager, Error>;
fn new_job_set(&self) -> Result<Self::JobSet, Error>;
fn list_units_by_states(
&self,
states: &[&str],
) -> Result<Vec<Self::UnitStatus>, Error>;
}
Required Associated Types§
Required Methods§
Sourcefn system_status(&self) -> Result<SystemStatus, Error>
fn system_status(&self) -> Result<SystemStatus, Error>
Checks whether this service manager has a working connection to systemd and that systemd is running.
Sourcefn daemon_reload(&self) -> Result<(), Error>
fn daemon_reload(&self) -> Result<(), Error>
Performs a systemd daemon reload, blocking until complete.
fn reset_failed(&self) -> Result<(), Error>
Sourcefn unit_manager(
&self,
address: &Self::UnitStatus,
) -> Result<Self::UnitManager, Error>
fn unit_manager( &self, address: &Self::UnitStatus, ) -> Result<Self::UnitManager, Error>
Builds a unit manager for the unit with the given address.