Trait wnf::TryIntoSecurityDescriptor
source · pub trait TryIntoSecurityDescriptor: Sealed {
type IntoSecurityDescriptor: Borrow<SecurityDescriptor>;
// Required method
fn try_into_security_descriptor(
self
) -> Result<Self::IntoSecurityDescriptor>;
}
Expand description
A trait for types that can be fallibly converted into a security descriptor
Since SecurityDescriptor
is an opaque type, this does not mean (fallibly) converting into an actual
SecurityDescriptor
but fallibly converting into some type that can be borrowed as a SecurityDescriptor
.
This trait is implemented for
- all types that implement
Borrow<SecurityDescriptor>
- the type
UnspecifiedSecurityDescriptor
This allows the StateCreation::create_owned
and StateCreation::create_static
methods to be called after
- either setting a security descriptor explicitly through
StateCreation::security_descriptor
- or leaving the security descriptor unspecified (in which case a default security descriptor will be used) while avoiding initial creation of a default security descriptor if one is specified explicitly later.
This trait is sealed and cannot be implemented outside of wnf
.
Required Associated Types§
sourcetype IntoSecurityDescriptor: Borrow<SecurityDescriptor>
type IntoSecurityDescriptor: Borrow<SecurityDescriptor>
The target type of the fallible conversion