pub struct SystemdServiceManager {
pub user: bool,
pub config: SystemdConfig,
}
Expand description
Implementation of ServiceManager
for Linux’s systemd
Fields§
§user: bool
Whether or not this manager is operating at the user-level
config: SystemdConfig
Configuration settings tied to systemd services
Implementations§
Source§impl SystemdServiceManager
impl SystemdServiceManager
Sourcepub fn into_system(self) -> Self
pub fn into_system(self) -> Self
Change manager to work with system services
Sourcepub fn with_config(self, config: SystemdConfig) -> Self
pub fn with_config(self, config: SystemdConfig) -> Self
Update manager to use the specified config
Trait Implementations§
Source§impl Clone for SystemdServiceManager
impl Clone for SystemdServiceManager
Source§fn clone(&self) -> SystemdServiceManager
fn clone(&self) -> SystemdServiceManager
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SystemdServiceManager
impl Debug for SystemdServiceManager
Source§impl Default for SystemdServiceManager
impl Default for SystemdServiceManager
Source§fn default() -> SystemdServiceManager
fn default() -> SystemdServiceManager
Returns the “default value” for a type. Read more
Source§impl From<SystemdServiceManager> for TypedServiceManager
impl From<SystemdServiceManager> for TypedServiceManager
Source§fn from(manager: SystemdServiceManager) -> Self
fn from(manager: SystemdServiceManager) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SystemdServiceManager
impl PartialEq for SystemdServiceManager
Source§impl ServiceManager for SystemdServiceManager
impl ServiceManager for SystemdServiceManager
Source§fn available(&self) -> Result<bool>
fn available(&self) -> Result<bool>
Determines if the service manager exists (e.g. is
launchd
available on the system?) and
can be usedSource§fn install(&self, ctx: ServiceInstallCtx) -> Result<()>
fn install(&self, ctx: ServiceInstallCtx) -> Result<()>
Installs a new service using the manager
Source§fn uninstall(&self, ctx: ServiceUninstallCtx) -> Result<()>
fn uninstall(&self, ctx: ServiceUninstallCtx) -> Result<()>
Uninstalls an existing service using the manager
Source§fn level(&self) -> ServiceLevel
fn level(&self) -> ServiceLevel
Returns the current target level for the manager
Source§fn set_level(&mut self, level: ServiceLevel) -> Result<()>
fn set_level(&mut self, level: ServiceLevel) -> Result<()>
Sets the target level for the manager
Source§fn status(&self, ctx: ServiceStatusCtx) -> Result<ServiceStatus>
fn status(&self, ctx: ServiceStatusCtx) -> Result<ServiceStatus>
Return the service status info
impl Eq for SystemdServiceManager
impl StructuralPartialEq for SystemdServiceManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.