pub struct RegisteredTask { /* private fields */ }Expand description
What Task Scheduler says about a task that is registered.
Implementations§
Source§impl RegisteredTask
impl RegisteredTask
Sourcepub fn from_document(name: &str, document: &str, running: bool) -> Self
pub fn from_document(name: &str, document: &str, running: bool) -> Self
Reads the fields this module cares about out of a /Query /XML
document.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Its description.
Sourcepub fn running(&self) -> bool
pub fn running(&self) -> bool
Whether Task Scheduler reports it as running.
Read from localised output, exactly as
crate::service’s Windows backend reads it, and for the same reason:
schtasks /Query /FO CSV prints its Status column in the machine’s
display language and there is no locale-independent equivalent short of
COM. On a non-English Windows this is false for a task that is in fact
running. Nothing in the provisioning transaction branches on it — the
authority for “is the Linux host healthy” is the Linux service’s own
status — so it is a display value and only that.
Sourcepub fn is_product_owned(&self) -> bool
pub fn is_product_owned(&self) -> bool
Whether this product created it.
The gate on every mutation. See the module documentation: the name is derived, so it can collide with a hand-made task, and the marker is what tells the two apart.
Trait Implementations§
Source§impl Clone for RegisteredTask
impl Clone for RegisteredTask
Source§fn clone(&self) -> RegisteredTask
fn clone(&self) -> RegisteredTask
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more