Struct service_manager::SystemdServiceManager
source · [−]pub struct SystemdServiceManager {
pub user: bool,
pub config: SystemdConfig,
}Expand description
Implementation of ServiceManager for Linux’s systemd
Fields
user: boolWhether or not this manager is operating at the user-level
config: SystemdConfigConfiguration settings tied to systemd services
Implementations
sourceimpl 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
sourceimpl Clone for SystemdServiceManager
impl Clone for SystemdServiceManager
sourcefn clone(&self) -> SystemdServiceManager
fn clone(&self) -> SystemdServiceManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for SystemdServiceManager
impl Debug for SystemdServiceManager
sourceimpl Default for SystemdServiceManager
impl Default for SystemdServiceManager
sourcefn default() -> SystemdServiceManager
fn default() -> SystemdServiceManager
Returns the “default value” for a type. Read more
sourceimpl From<SystemdServiceManager> for TypedServiceManager
impl From<SystemdServiceManager> for TypedServiceManager
sourcefn from(manager: SystemdServiceManager) -> Self
fn from(manager: SystemdServiceManager) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<SystemdServiceManager> for SystemdServiceManager
impl PartialEq<SystemdServiceManager> for SystemdServiceManager
sourcefn eq(&self, other: &SystemdServiceManager) -> bool
fn eq(&self, other: &SystemdServiceManager) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &SystemdServiceManager) -> bool
fn ne(&self, other: &SystemdServiceManager) -> bool
This method tests for !=.
sourceimpl ServiceManager for SystemdServiceManager
impl ServiceManager for SystemdServiceManager
sourcefn 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 used Read more
sourcefn install(&self, ctx: ServiceInstallCtx) -> Result<()>
fn install(&self, ctx: ServiceInstallCtx) -> Result<()>
Installs a new service using the manager
sourcefn uninstall(&self, ctx: ServiceUninstallCtx) -> Result<()>
fn uninstall(&self, ctx: ServiceUninstallCtx) -> Result<()>
Uninstalls an existing service using the manager
sourcefn start(&self, ctx: ServiceStartCtx) -> Result<()>
fn start(&self, ctx: ServiceStartCtx) -> Result<()>
Starts a service using the manager
sourcefn stop(&self, ctx: ServiceStopCtx) -> Result<()>
fn stop(&self, ctx: ServiceStopCtx) -> Result<()>
Stops a running service using the manager
sourcefn level(&self) -> ServiceLevel
fn level(&self) -> ServiceLevel
Returns the current target level for the manager
sourcefn set_level(&mut self, level: ServiceLevel) -> Result<()>
fn set_level(&mut self, level: ServiceLevel) -> Result<()>
Sets the target level for the manager
impl Eq for SystemdServiceManager
impl StructuralEq for SystemdServiceManager
impl StructuralPartialEq for SystemdServiceManager
Auto Trait Implementations
impl RefUnwindSafe for SystemdServiceManager
impl Send for SystemdServiceManager
impl Sync for SystemdServiceManager
impl Unpin for SystemdServiceManager
impl UnwindSafe for SystemdServiceManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more