pub struct ZinitServiceManager { /* private fields */ }
Implementations§
Source§impl ZinitServiceManager
impl ZinitServiceManager
pub fn new(socket_path: &str) -> Result<Self, ServiceManagerError>
Trait Implementations§
Source§impl ServiceManager for ZinitServiceManager
impl ServiceManager for ZinitServiceManager
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 ZinitServiceManager
impl RefUnwindSafe for ZinitServiceManager
impl Send for ZinitServiceManager
impl Sync for ZinitServiceManager
impl Unpin for ZinitServiceManager
impl UnwindSafe for ZinitServiceManager
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