pub struct PolicyDecision {Show 19 fields
pub decision_version: PolicyDecision_DecisionVersion,
pub policy_engine: PolicyDecision_PolicyEngine,
pub engine_version: Option<String>,
pub trust_domain: TrustDomain,
pub subject: ActorId,
pub instance: Option<InstanceId>,
pub action: ActionName,
pub target: Option<String>,
pub decision: PolicyDecision_Decision,
pub rule_id: Option<String>,
pub reason: Option<String>,
pub approval: Option<ApprovalRequirement>,
pub proof_required: Option<ProofLevel>,
pub constraints_applied: Option<Vec<Constraint>>,
pub negative_capabilities_consulted: Option<Vec<NegativeCapability>>,
pub enforcement_level: Option<EnforcementLevel>,
pub evaluated_at: Timestamp,
pub policy_manifest_hash: Option<HashRef>,
pub context: Option<Value>,
}Expand description
Structured result emitted by a TrustForge PolicyEngine. Captures the decision, the rule that produced it, the constraints attached, and enough provenance to be replayed in audits and verified after the fact (TF-0004, DECISIONS.md “AI-readable manifests”).
Fields§
§decision_version: PolicyDecision_DecisionVersionVersion of the policy-decision schema itself.
policy_engine: PolicyDecision_PolicyEngineWhich engine produced this decision.
engine_version: Option<String>Free-form version label so audits can replay the same engine build.
trust_domain: TrustDomain§subject: ActorIdActor URI the policy was evaluated against.
instance: Option<InstanceId>Optional actor instance URI captured in the decision.
action: ActionNameAction name being authorized.
target: Option<String>Target the action operates on (file path, record id, URL, …).
decision: PolicyDecision_DecisionEffect produced by the policy engine.
rule_id: Option<String>Identifier of the rule that produced the decision.
reason: Option<String>Human-readable explanation of the decision.
approval: Option<ApprovalRequirement>§proof_required: Option<ProofLevel>§constraints_applied: Option<Vec<Constraint>>Constraints the rule attached to this decision.
negative_capabilities_consulted: Option<Vec<NegativeCapability>>Negative capabilities considered while reaching the decision (for audit).
enforcement_level: Option<EnforcementLevel>§evaluated_at: Timestamp§policy_manifest_hash: Option<HashRef>Hash of the policy manifest that was evaluated. Lets auditors replay the decision against the exact manifest.
context: Option<Value>Free-form evaluation-time context (session id, posture flags, quorum approver count, etc.).
Trait Implementations§
Source§impl Clone for PolicyDecision
impl Clone for PolicyDecision
Source§fn clone(&self) -> PolicyDecision
fn clone(&self) -> PolicyDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolicyDecision
impl Debug for PolicyDecision
Source§impl<'de> Deserialize<'de> for PolicyDecision
impl<'de> Deserialize<'de> for PolicyDecision
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PolicyDecision
Source§impl PartialEq for PolicyDecision
impl PartialEq for PolicyDecision
Source§fn eq(&self, other: &PolicyDecision) -> bool
fn eq(&self, other: &PolicyDecision) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PolicyDecision
impl Serialize for PolicyDecision
impl StructuralPartialEq for PolicyDecision
Auto Trait Implementations§
impl Freeze for PolicyDecision
impl RefUnwindSafe for PolicyDecision
impl Send for PolicyDecision
impl Sync for PolicyDecision
impl Unpin for PolicyDecision
impl UnsafeUnpin for PolicyDecision
impl UnwindSafe for PolicyDecision
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more