pub struct PolicyDocument {
pub version: u32,
pub name: String,
pub rules: Vec<PolicyRule>,
pub enforcement_mode: EnforcementMode,
}Expand description
Minimal policy document stub.
Full schema deferred to AAASM-105/AAASM-69. Sufficient for test evaluators
to implement load_policy and validate_policy without a real parser.
Gated on alloc because name and rules require heap allocation.
Fields§
§version: u32Schema version number.
name: StringHuman-readable policy name.
rules: Vec<PolicyRule>Ordered list of rules evaluated top-to-bottom.
enforcement_mode: EnforcementModeEnforcement posture for this policy. Defaults to Enforce when the
field is absent from the source document, preserving pre-feature
behavior for all existing policies.
Trait Implementations§
Source§impl Clone for PolicyDocument
impl Clone for PolicyDocument
Source§fn clone(&self) -> PolicyDocument
fn clone(&self) -> PolicyDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyDocument
impl Debug for PolicyDocument
Source§impl PartialEq for PolicyDocument
impl PartialEq for PolicyDocument
Source§fn eq(&self, other: &PolicyDocument) -> bool
fn eq(&self, other: &PolicyDocument) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PolicyDocument
Auto Trait Implementations§
impl Freeze for PolicyDocument
impl RefUnwindSafe for PolicyDocument
impl Send for PolicyDocument
impl Sync for PolicyDocument
impl Unpin for PolicyDocument
impl UnsafeUnpin for PolicyDocument
impl UnwindSafe for PolicyDocument
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