Struct service_manager::ScServiceManager
source · pub struct ScServiceManager {
pub config: ScConfig,
}
Expand description
Implementation of ServiceManager
for Window Service
leveraging sc.exe
Fields§
§config: ScConfig
Configuration settings tied to rc.d services
Implementations§
source§impl ScServiceManager
impl ScServiceManager
sourcepub fn with_config(self, config: ScConfig) -> Self
pub fn with_config(self, config: ScConfig) -> Self
Update manager to use the specified config
Trait Implementations§
source§impl Clone for ScServiceManager
impl Clone for ScServiceManager
source§fn clone(&self) -> ScServiceManager
fn clone(&self) -> ScServiceManager
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 ScServiceManager
impl Debug for ScServiceManager
source§impl Default for ScServiceManager
impl Default for ScServiceManager
source§fn default() -> ScServiceManager
fn default() -> ScServiceManager
Returns the “default value” for a type. Read more
source§impl From<ScServiceManager> for TypedServiceManager
impl From<ScServiceManager> for TypedServiceManager
source§fn from(manager: ScServiceManager) -> Self
fn from(manager: ScServiceManager) -> Self
Converts to this type from the input type.
source§impl PartialEq<ScServiceManager> for ScServiceManager
impl PartialEq<ScServiceManager> for ScServiceManager
source§fn eq(&self, other: &ScServiceManager) -> bool
fn eq(&self, other: &ScServiceManager) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ServiceManager for ScServiceManager
impl ServiceManager for ScServiceManager
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
impl Eq for ScServiceManager
impl StructuralEq for ScServiceManager
impl StructuralPartialEq for ScServiceManager
Auto Trait Implementations§
impl RefUnwindSafe for ScServiceManager
impl Send for ScServiceManager
impl Sync for ScServiceManager
impl Unpin for ScServiceManager
impl UnwindSafe for ScServiceManager
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