#[non_exhaustive]pub enum Error {
TooManySubAuthorities,
AuthorityOutOfRange,
InvalidSid,
Windows(u32),
}Expand description
An error reported while creating, validating, or querying a SID.
Failures detected by this crate are reported as descriptive variants, while
failures reported by a Windows API carry the Win32 error code in
Error::Windows. Error::win32_code maps any variant to a Win32 error
code, and the From conversion to std::io::Error does the same for
I/O-based error handling.
This type is owned by safe-sid, so it remains stable independently of the
version of windows-core used by an application. String parsing reports
SidParseError instead, which converts into this type via From.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TooManySubAuthorities
More than 15 sub-authorities were supplied.
AuthorityOutOfRange
An integer identifier authority does not fit in 48 bits.
InvalidSid
The bytes, string, or pointer do not describe a valid SID.
Windows(u32)
A Windows API call failed with this Win32 error code.
Implementations§
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()