#[non_exhaustive]pub struct PrivilegeInfo {
pub name: String,
pub enabled: bool,
pub enabled_by_default: bool,
pub removed: bool,
}Expand description
Represents the status of a single Windows privilege.
Returned by enumerate_privileges to describe each privilege on the
current process token, including its name and current state.
§Examples
use token_privilege::enumerate_privileges;
let privileges = enumerate_privileges()?;
for priv_info in &privileges {
println!("{}: enabled={}", priv_info.name, priv_info.enabled);
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe privilege name (e.g., "SeDebugPrivilege").
enabled: boolWhether the privilege is currently enabled.
enabled_by_default: boolWhether the privilege is enabled by default.
removed: boolWhether the privilege has been removed from the token.
Trait Implementations§
Source§impl Clone for PrivilegeInfo
impl Clone for PrivilegeInfo
Source§fn clone(&self) -> PrivilegeInfo
fn clone(&self) -> PrivilegeInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 PrivilegeInfo
impl Debug for PrivilegeInfo
Source§impl PartialEq for PrivilegeInfo
impl PartialEq for PrivilegeInfo
impl Eq for PrivilegeInfo
impl StructuralPartialEq for PrivilegeInfo
Auto Trait Implementations§
impl Freeze for PrivilegeInfo
impl RefUnwindSafe for PrivilegeInfo
impl Send for PrivilegeInfo
impl Sync for PrivilegeInfo
impl Unpin for PrivilegeInfo
impl UnsafeUnpin for PrivilegeInfo
impl UnwindSafe for PrivilegeInfo
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