#[non_exhaustive]pub enum ElevateError {
Win32 {
operation: &'static str,
source: Error,
},
PrivilegeNotAssigned(&'static str),
ProcessNotFound(String),
ServiceFailed {
name: String,
},
ServiceTimeout {
name: String,
seconds: u64,
},
SessionZeroNotSupported,
NoInteractiveSession,
Io(Error),
MissingExePath,
InvalidTokenBuffer,
}Expand description
The central error type for all privilege elevation and Windows security operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Win32
A raw Win32 subsystem call failed.
Fields
PrivilegeNotAssigned(&'static str)
A required Windows privilege could not be enabled.
ProcessNotFound(String)
A required genuine Windows SYSTEM process was not found.
ServiceFailed
A Windows service failed to start or entered a failed state.
ServiceTimeout
Waiting for a service to reach running state timed out.
SessionZeroNotSupported
Caller is running in Session 0 (non-interactive service context).
NoInteractiveSession
No active interactive session with a logged-on user was found.
Io(Error)
An I/O error occurred during path resolution or execution.
MissingExePath
Executable path was not provided prior to launch.
InvalidTokenBuffer
A query to token information returned corrupted or out-of-bounds data.
Trait Implementations§
Source§impl Debug for ElevateError
impl Debug for ElevateError
Source§impl Display for ElevateError
impl Display for ElevateError
Source§impl Error for ElevateError
impl Error for ElevateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ElevateError
impl !UnwindSafe for ElevateError
impl Freeze for ElevateError
impl Send for ElevateError
impl Sync for ElevateError
impl Unpin for ElevateError
impl UnsafeUnpin for ElevateError
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