pub struct SystemdServiceManager { /* private fields */ }
Implementations§
Source§impl SystemdServiceManager
impl SystemdServiceManager
pub fn new() -> Self
pub fn new_system() -> Self
Trait Implementations§
Source§impl Debug for SystemdServiceManager
impl Debug for SystemdServiceManager
Source§impl ServiceManager for SystemdServiceManager
impl ServiceManager for SystemdServiceManager
Source§fn exists(&self, service_name: &str) -> Result<bool, ServiceManagerError>
fn exists(&self, service_name: &str) -> Result<bool, ServiceManagerError>
Check if a service exists
Source§fn start(&self, config: &ServiceConfig) -> Result<(), ServiceManagerError>
fn start(&self, config: &ServiceConfig) -> Result<(), ServiceManagerError>
Start a service with the given configuration
Source§fn start_existing(&self, service_name: &str) -> Result<(), ServiceManagerError>
fn start_existing(&self, service_name: &str) -> Result<(), ServiceManagerError>
Start an existing service by name (load existing plist/config)
Source§fn start_and_confirm(
&self,
config: &ServiceConfig,
timeout_secs: u64,
) -> Result<(), ServiceManagerError>
fn start_and_confirm( &self, config: &ServiceConfig, timeout_secs: u64, ) -> Result<(), ServiceManagerError>
Start a service and wait for confirmation that it’s running or failed
Source§fn start_existing_and_confirm(
&self,
service_name: &str,
timeout_secs: u64,
) -> Result<(), ServiceManagerError>
fn start_existing_and_confirm( &self, service_name: &str, timeout_secs: u64, ) -> Result<(), ServiceManagerError>
Start an existing service and wait for confirmation that it’s running or failed
Source§fn restart(&self, service_name: &str) -> Result<(), ServiceManagerError>
fn restart(&self, service_name: &str) -> Result<(), ServiceManagerError>
Restart a service by name
Source§fn status(
&self,
service_name: &str,
) -> Result<ServiceStatus, ServiceManagerError>
fn status( &self, service_name: &str, ) -> Result<ServiceStatus, ServiceManagerError>
Get the status of a service
Auto Trait Implementations§
impl Freeze for SystemdServiceManager
impl RefUnwindSafe for SystemdServiceManager
impl Send for SystemdServiceManager
impl Sync for SystemdServiceManager
impl Unpin for SystemdServiceManager
impl UnwindSafe for SystemdServiceManager
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