Trustee

Struct Trustee 

Source
#[repr(C)]
pub struct Trustee<'s> { /* private fields */ }
Expand description

An entity that can be added to an ACL.

Trustees can identify their subject (usually an account or a group) using a string or a Sid.

Implementations§

Source§

impl<'s> Trustee<'s>

Source

pub fn as_ptr(&self) -> *const TRUSTEE_W

Get a pointer to the underlying buffer

Source

pub fn as_mut_ptr(&mut self) -> *mut TRUSTEE_W

Get a mutable pointer to the underlying buffer

Source

pub unsafe fn allocate() -> Self

Allocate and zero-initialize space for a Trustee

§Safety

The Trustee is zero-initialized, and should only be used in contexts where that is acceptable.

Source

pub fn get_subject(&self) -> TrusteeSubject<'s>

Get the TrusteeSubject of a Trustee

§Panics

Panics if the trusteeForm in the underlying object is an unrecognized value. To get the value, use wrappers::GetTrusteeForm directly.

Also panics if the pointer value is null.

Trait Implementations§

Source§

impl<'s> Debug for Trustee<'s>

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&OsStr> for Trustee<'static>

Source§

fn from(name: &OsStr) -> Self

Converts to this type from the input type.
Source§

impl<'s> From<&'s Sid> for Trustee<'s>

Source§

fn from(sid: &'s Sid) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'s> Freeze for Trustee<'s>

§

impl<'s> RefUnwindSafe for Trustee<'s>

§

impl<'s> !Send for Trustee<'s>

§

impl<'s> !Sync for Trustee<'s>

§

impl<'s> Unpin for Trustee<'s>

§

impl<'s> UnwindSafe for Trustee<'s>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.