ServiceManager

Trait ServiceManager 

Source
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§

Source

fn system_status(&self) -> Result<SystemStatus, Error>

Checks whether this service manager has a working connection to systemd and that systemd is running.

Source

fn daemon_reload(&self) -> Result<(), Error>

Performs a systemd daemon reload, blocking until complete.

Source

fn reset_failed(&self) -> Result<(), Error>

Source

fn unit_manager( &self, address: &Self::UnitStatus, ) -> Result<Self::UnitManager, Error>

Builds a unit manager for the unit with the given address.

Source

fn new_job_set(&self) -> Result<Self::JobSet, Error>

Source

fn list_units_by_states( &self, states: &[&str], ) -> Result<Vec<Self::UnitStatus>, Error>

Implementors§