Struct service_manager::ScServiceManager
source · [−]pub struct ScServiceManager {
pub config: ScConfig,
}Expand description
Implementation of ServiceManager for Window Service
leveraging sc.exe
Fields
config: ScConfigConfiguration settings tied to rc.d services
Implementations
sourceimpl 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
sourceimpl Clone for ScServiceManager
impl Clone for ScServiceManager
sourcefn clone(&self) -> ScServiceManager
fn clone(&self) -> ScServiceManager
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 ScServiceManager
impl Debug for ScServiceManager
sourceimpl Default for ScServiceManager
impl Default for ScServiceManager
sourcefn default() -> ScServiceManager
fn default() -> ScServiceManager
Returns the “default value” for a type. Read more
sourceimpl From<ScServiceManager> for TypedServiceManager
impl From<ScServiceManager> for TypedServiceManager
sourcefn from(manager: ScServiceManager) -> Self
fn from(manager: ScServiceManager) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ScServiceManager> for ScServiceManager
impl PartialEq<ScServiceManager> for ScServiceManager
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &ScServiceManager) -> bool
fn ne(&self, other: &ScServiceManager) -> bool
This method tests for !=.
sourceimpl ServiceManager for ScServiceManager
impl ServiceManager for ScServiceManager
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 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
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