pub struct Registration {
pub manager: DefinitionKind,
pub start_mode: StartMode,
pub command_line: String,
pub account: Option<String>,
pub running: bool,
pub starts_automatically: bool,
pub restart_delay: Option<Duration>,
}Expand description
What a service manager says about a registration it holds.
Fields§
§manager: DefinitionKindWhich manager holds it, which is also what decides the start mode: a Windows service is a boot registration and a Task Scheduler task is a login one; a LaunchDaemon and a system unit are boot, a LaunchAgent and a user unit are login.
start_mode: StartModeThe start mode the domain it was found in implies.
command_line: StringThe full command line, as the manager stores it.
account: Option<String>The account it runs under, when the manager reports one.
running: boolWhether it is running now.
starts_automatically: boolWhether it will start by itself.
Distinct from Registration::start_mode: a Windows service can be
registered in the boot domain and still be set to demand start, which
is a service that exists, looks installed, and does not come back after
a reboot.
restart_delay: Option<Duration>The restart-on-failure delay the manager reports, when it reports one.
The delay rather than the whole RestartPolicy, because that is the
half every one of the four managers can be asked for. The failure-count
reset window has no representation at all in Task Scheduler or launchd,
so a RestartPolicy read back from them would carry one number the
manager reported and one this module invented — and a comparison against
an invented number is a comparison that cannot fail.
Implementations§
Trait Implementations§
Source§impl Clone for Registration
impl Clone for Registration
Source§fn clone(&self) -> Registration
fn clone(&self) -> Registration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more