pub struct SystemctlServiceManager { /* private fields */ }
Implementations§
Source§impl SystemctlServiceManager
impl SystemctlServiceManager
Sourcepub fn new(system: bool) -> Result<SystemctlServiceManager, Error>
pub fn new(system: bool) -> Result<SystemctlServiceManager, Error>
Creates a new systemctl service manager instance. The given Boolean indicates whether we should connect to the system or user service manager.
Trait Implementations§
Source§impl<'a> ServiceManager for &'a SystemctlServiceManager
impl<'a> ServiceManager for &'a SystemctlServiceManager
Source§fn daemon_reload(&self) -> Result<(), Error>
fn daemon_reload(&self) -> Result<(), Error>
Performs a systemd daemon reload, blocking until complete.
Source§fn unit_manager(
&self,
status: &SystemctlUnitStatus,
) -> Result<SystemctlUnitManager, Error>
fn unit_manager( &self, status: &SystemctlUnitStatus, ) -> Result<SystemctlUnitManager, Error>
Builds a unit manager for the unit with the given status.
type UnitManager = SystemctlUnitManager
type UnitStatus = SystemctlUnitStatus
type JobSet = SystemctlJobSet<'a>
Source§fn 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.
fn reset_failed(&self) -> Result<(), Error>
fn new_job_set(&self) -> Result<SystemctlJobSet<'a>, Error>
fn list_units_by_states( &self, states: &[&str], ) -> Result<Vec<SystemctlUnitStatus>, Error>
Auto Trait Implementations§
impl Freeze for SystemctlServiceManager
impl RefUnwindSafe for SystemctlServiceManager
impl Send for SystemctlServiceManager
impl Sync for SystemctlServiceManager
impl Unpin for SystemctlServiceManager
impl UnwindSafe for SystemctlServiceManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more