pub struct TaskPrincipal { /* private fields */ }Expand description
The account a Task Scheduler task runs as.
Task Scheduler, unlike the other three managers, needs the principal spelled
out in the document. Isolating the one impure step keeps
windows_scheduled_task_xml a pure function that every CI leg can assert.
Implementations§
Source§impl TaskPrincipal
impl TaskPrincipal
Sourcepub fn current() -> Result<Self, ServiceError>
pub fn current() -> Result<Self, ServiceError>
The account running this call, as DOMAIN\user.
§Errors
ServiceError::BinaryPath is not the right shape here, so this
reports ServiceError::Control naming what the environment failed to
say.
Trait Implementations§
Source§impl Clone for TaskPrincipal
impl Clone for TaskPrincipal
Source§fn clone(&self) -> TaskPrincipal
fn clone(&self) -> TaskPrincipal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TaskPrincipal
impl Debug for TaskPrincipal
impl Eq for TaskPrincipal
Source§impl PartialEq for TaskPrincipal
impl PartialEq for TaskPrincipal
impl StructuralPartialEq for TaskPrincipal
Auto Trait Implementations§
impl Freeze for TaskPrincipal
impl RefUnwindSafe for TaskPrincipal
impl Send for TaskPrincipal
impl Sync for TaskPrincipal
impl Unpin for TaskPrincipal
impl UnsafeUnpin for TaskPrincipal
impl UnwindSafe for TaskPrincipal
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