Skip to main content

AceBuf

Struct AceBuf 

Source
pub struct AceBuf(/* private fields */);
Expand description

An owned, validated native Windows ACE packet.

Implementations§

Source§

impl AceBuf

Source

pub fn try_from_bytes(bytes: impl Into<Box<[u8]>>) -> Result<Self, AceError>

Takes ownership of a raw packet after validating it.

Source

pub fn allow( sid: &Sid, mask: AccessMask, options: AceBuildOptions, ) -> Result<Self, AceBuildError>

Builds an access-allowed ACE.

Source

pub fn deny( sid: &Sid, mask: AccessMask, options: AceBuildOptions, ) -> Result<Self, AceBuildError>

Builds an access-denied ACE.

Source

pub fn audit( sid: &Sid, mask: AccessMask, successful: bool, failed: bool, options: AceBuildOptions, ) -> Result<Self, AceBuildError>

Builds a system-audit ACE.

Source

pub fn into_boxed_bytes(self) -> Box<[u8]>

Returns the owned packet bytes.

Methods from Deref<Target = Ace>§

Source

pub fn as_bytes(&self) -> &[u8]

Returns the exact native ACE packet.

Source

pub fn type_code(&self) -> u8

Returns the native ACE type code.

Source

pub fn ace_type(&self) -> AceType

Returns the classified ACE type.

Source

pub fn flags(&self) -> AceFlags

Returns the native ACE flags byte.

Source

pub fn size(&self) -> u16

Returns the declared ACE size.

Source

pub fn mask(&self) -> Option<AccessMask>

Returns the access mask for ACE layouts that contain one.

Source

pub fn sid(&self) -> Option<Sid>

Returns the trustee SID for ACE layouts that contain one.

Source

pub fn object_flags(&self) -> Option<ObjectAceFlags>

Returns object-specific flags for object ACE layouts.

Source

pub fn object_type(&self) -> Option<Guid>

Returns the optional object-type GUID for object ACE layouts.

Source

pub fn inherited_object_type(&self) -> Option<Guid>

Returns the optional inherited-object-type GUID for object ACE layouts.

Source

pub fn application_data(&self) -> Option<&[u8]>

Returns trailing application data for parsed SID-bearing layouts.

Trait Implementations§

Source§

impl AsRef<Ace> for AceBuf

Source§

fn as_ref(&self) -> &Ace

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<Ace> for AceBuf

Source§

fn borrow(&self) -> &Ace

Immutably borrows from an owned value. Read more
Source§

impl Clone for AceBuf

Source§

fn clone(&self) -> AceBuf

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AceBuf

Source§

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

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

impl Deref for AceBuf

Source§

type Target = Ace

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'de> Deserialize<'de> for AceBuf

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for AceBuf

Source§

impl Hash for AceBuf

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AceBuf

Source§

fn eq(&self, other: &AceBuf) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AceBuf

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AceBuf

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.