sddl 0.1.9

a library to parse and analyse SDDL Strings
Documentation
use strum_macros::Display;

use binrw::binrw;
use serde::Serialize;

/// <https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/628ebb1d-c509-4ea0-a10f-77ef97ca4586>
#[repr(u8)]
#[binrw]
#[brw(repr=u8)]
#[allow(non_camel_case_types)]
#[derive(Eq, PartialEq, Display, Clone, Copy, Debug, Serialize)]
pub enum Type {
    /// Access-allowed ACE that uses the ACCESS_ALLOWED_ACE (section 2.4.4.2)
    /// structure.
    ACCESS_ALLOWED_ACE_TYPE = 0x00,

    /// Access-denied ACE that uses the ACCESS_DENIED_ACE (section 2.4.4.4)
    /// structure.
    ACCESS_DENIED_ACE_TYPE = 0x01,

    /// System-audit ACE that uses the SYSTEM_AUDIT_ACE (section 2.4.4.10)
    /// structure.
    SYSTEM_AUDIT_ACE_TYPE = 0x02,

    /// Reserved for future use.
    SYSTEM_ALARM_ACE_TYPE = 0x03,

    /// Reserved for future use.
    ACCESS_ALLOWED_COMPOUND_ACE_TYPE = 0x04,

    /// Object-specific access-allowed ACE that uses the
    /// ACCESS_ALLOWED_OBJECT_ACE (section 2.4.4.3) structure.
    ACCESS_ALLOWED_OBJECT_ACE_TYPE = 0x05,

    /// Object-specific access-denied ACE that uses the ACCESS_DENIED_OBJECT_ACE
    /// (section 2.4.4.5) structure.
    ACCESS_DENIED_OBJECT_ACE_TYPE = 0x06,

    /// Object-specific system-audit ACE that uses the SYSTEM_AUDIT_OBJECT_ACE
    /// (section 2.4.4.11) structure.
    SYSTEM_AUDIT_OBJECT_ACE_TYPE = 0x07,

    /// Reserved for future use.
    SYSTEM_ALARM_OBJECT_ACE_TYPE = 0x08,

    /// Access-allowed callback ACE that uses the ACCESS_ALLOWED_CALLBACK_ACE
    /// (section 2.4.4.6) structure.
    ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 0x09,

    /// Access-denied callback ACE that uses the ACCESS_DENIED_CALLBACK_ACE
    /// (section 2.4.4.7) structure.
    ACCESS_DENIED_CALLBACK_ACE_TYPE = 0x0a,

    /// Object-specific access-allowed callback ACE that uses the
    /// ACCESS_ALLOWED_CALLBACK_OBJECT_ACE (section 2.4.4.8) structure.
    ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 0x0b,

    /// Object-specific access-denied callback ACE that uses the
    /// ACCESS_DENIED_CALLBACK_OBJECT_ACE (section 2.4.4.9) structure.
    ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 0x0c,

    /// System-audit callback ACE that uses the SYSTEM_AUDIT_CALLBACK_ACE
    /// (section 2.4.4.12) structure.
    SYSTEM_AUDIT_CALLBACK_ACE_TYPE = 0x0d,

    /// Reserved for future use.
    SYSTEM_ALARM_CALLBACK_ACE_TYPE = 0x0e,

    /// System-audit callback ACE that uses the SYSTEM_AUDIT_CALLBACK_ACE
    /// (section 2.4.4.12) structure.
    SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = 0x0f,

    /// Reserved for future use.
    SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = 0x10,

    /// Object-specific system-audit callback ACE that uses the
    /// SYSTEM_AUDIT_CALLBACK_OBJECT_ACE (section 2.4.4.14) structure.
    SYSTEM_MANDATORY_LABEL_ACE_TYPE = 0x11,

    /// Reserved for future use.
    SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE = 0x12,

    /// Mandatory label ACE that uses the SYSTEM_MANDATORY_LABEL_ACE
    /// (section 2.4.4.13) structure.
    SYSTEM_SCOPED_POLICY_ID_ACE_TYPE = 0x13,
}