Struct wnf::BoxedSecurityDescriptor
source · pub struct BoxedSecurityDescriptor { /* private fields */ }
Expand description
An owned security descriptor allocated on the local heap
Unlike Box<SecurityDescriptor>
, this allocates memory on the
local heap.
There are two ways to create a BoxedSecurityDescriptor
:
- via the
BoxedSecurityDescriptor::create_everyone_generic_all
method - via the
FromStr
implementation ofBoxedSecurityDescriptor
Implementations§
source§impl BoxedSecurityDescriptor
impl BoxedSecurityDescriptor
sourcepub fn create_everyone_generic_all() -> Result<Self>
pub fn create_everyone_generic_all() -> Result<Self>
Creates a security descriptor granting GENERIC_ALL
access to Everyone
This is the security descriptor used by default when creating states.
The created security descriptor corresponds to the Security Descriptor String D:(A;;GA;;;WD)
, meaning it has:
- no owner
- no group
- no System Access Control List (SACL)
- a Discretionary Access Control List (
D
= DACL) with a single Access Control Entry (ACE) granting (A
) theGENERIC_ALL
access right (GA
) toEveryone
(WD
= World)
§Errors
Returns an error if creating the security descriptor fails
Trait Implementations§
source§impl AsRef<SecurityDescriptor> for BoxedSecurityDescriptor
impl AsRef<SecurityDescriptor> for BoxedSecurityDescriptor
source§fn as_ref(&self) -> &SecurityDescriptor
fn as_ref(&self) -> &SecurityDescriptor
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<SecurityDescriptor> for BoxedSecurityDescriptor
impl Borrow<SecurityDescriptor> for BoxedSecurityDescriptor
source§fn borrow(&self) -> &SecurityDescriptor
fn borrow(&self) -> &SecurityDescriptor
Immutably borrows from an owned value. Read more
source§impl Debug for BoxedSecurityDescriptor
impl Debug for BoxedSecurityDescriptor
source§impl Deref for BoxedSecurityDescriptor
impl Deref for BoxedSecurityDescriptor
§type Target = SecurityDescriptor
type Target = SecurityDescriptor
The resulting type after dereferencing.
source§fn deref(&self) -> &SecurityDescriptor
fn deref(&self) -> &SecurityDescriptor
Dereferences the value.
source§impl Drop for BoxedSecurityDescriptor
impl Drop for BoxedSecurityDescriptor
source§impl FromStr for BoxedSecurityDescriptor
impl FromStr for BoxedSecurityDescriptor
source§fn from_str(s: &str) -> Result<Self>
fn from_str(s: &str) -> Result<Self>
Parses a BoxedSecurityDescriptor
from a Security Descriptor String
See Security Descriptor String Format for details.
impl Send for BoxedSecurityDescriptor
impl Sync for BoxedSecurityDescriptor
Auto Trait Implementations§
impl Freeze for BoxedSecurityDescriptor
impl RefUnwindSafe for BoxedSecurityDescriptor
impl Unpin for BoxedSecurityDescriptor
impl UnwindSafe for BoxedSecurityDescriptor
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<SD> TryIntoSecurityDescriptor for SDwhere
SD: Borrow<SecurityDescriptor>,
impl<SD> TryIntoSecurityDescriptor for SDwhere
SD: Borrow<SecurityDescriptor>,
§type IntoSecurityDescriptor = SD
type IntoSecurityDescriptor = SD
The target type of the fallible conversion