pub struct Sid { /* private fields */ }
Expand description
Owned and immutable security identifier.
Implementations§
Source§impl Sid
impl Sid
Sourcepub fn well_known(kind: WELL_KNOWN_SID_TYPE) -> Result<Self>
pub fn well_known(kind: WELL_KNOWN_SID_TYPE) -> Result<Self>
Build a Windows well‑known SID.
Sourcepub fn is_well_known(&self, kind: WELL_KNOWN_SID_TYPE) -> bool
pub fn is_well_known(&self, kind: WELL_KNOWN_SID_TYPE) -> bool
Does this SID match the specified well-known SID type?
Sourcepub fn from_parts(
authority: &SID_IDENTIFIER_AUTHORITY,
subids: &[u32],
) -> Result<Self>
pub fn from_parts( authority: &SID_IDENTIFIER_AUTHORITY, subids: &[u32], ) -> Result<Self>
Build a SID from an identifier authority and a slice of 32-bit
sub-authorities. Internally this uses AllocateAndInitializeSid
, which
supports up to 8 sub-authorities.
Convenience helper: construct an S-1-5-…
SID under the NT authority
(SECURITY_NT_AUTHORITY
) from the provided subauthorities.
Trait Implementations§
impl Eq for Sid
impl StructuralPartialEq for Sid
Auto Trait Implementations§
impl Freeze for Sid
impl RefUnwindSafe for Sid
impl Send for Sid
impl Sync for Sid
impl Unpin for Sid
impl UnwindSafe for Sid
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