Struct service_manager::WinSwServiceManager
source · pub struct WinSwServiceManager {
pub config: WinSwConfig,
}Expand description
Service manager implementation
Implementation of ServiceManager for Window Service
leveraging winsw.exe
Fields§
§config: WinSwConfigImplementations§
source§impl WinSwServiceManager
impl WinSwServiceManager
pub fn system() -> Self
pub fn with_config(self, config: WinSwConfig) -> Self
pub fn write_service_configuration( path: &PathBuf, ctx: &ServiceInstallCtx, config: &WinSwConfig ) -> Result<()>
Trait Implementations§
source§impl Clone for WinSwServiceManager
impl Clone for WinSwServiceManager
source§fn clone(&self) -> WinSwServiceManager
fn clone(&self) -> WinSwServiceManager
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 WinSwServiceManager
impl Debug for WinSwServiceManager
source§impl Default for WinSwServiceManager
impl Default for WinSwServiceManager
source§fn default() -> WinSwServiceManager
fn default() -> WinSwServiceManager
Returns the “default value” for a type. Read more
source§impl From<WinSwServiceManager> for TypedServiceManager
impl From<WinSwServiceManager> for TypedServiceManager
source§fn from(manager: WinSwServiceManager) -> Self
fn from(manager: WinSwServiceManager) -> Self
Converts to this type from the input type.
source§impl PartialEq for WinSwServiceManager
impl PartialEq for WinSwServiceManager
source§fn eq(&self, other: &WinSwServiceManager) -> bool
fn eq(&self, other: &WinSwServiceManager) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ServiceManager for WinSwServiceManager
impl ServiceManager for WinSwServiceManager
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 WinSwServiceManager
impl StructuralPartialEq for WinSwServiceManager
Auto Trait Implementations§
impl RefUnwindSafe for WinSwServiceManager
impl Send for WinSwServiceManager
impl Sync for WinSwServiceManager
impl Unpin for WinSwServiceManager
impl UnwindSafe for WinSwServiceManager
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.