pub struct PolicyPreviewResponse {
pub decisions: Vec<PolicyDecision>,
pub policy_version: Option<String>,
}Expand description
Response from POST /v1/policy/preview.
Fields§
§decisions: Vec<PolicyDecision>CLEANLIB-666: the App emits this array as results
(verbs::PolicyPreviewResponse.results), not decisions. Without the
alias the client parsed every real preview response into an EMPTY vec —
the verb silently returned nothing (exit 0) even after CLEANLIB-631/#362
fixed the request side. Alias makes the client read the real wire.
policy_version: Option<String>CLEANLIB-666 residual: the App emits policy_version alongside results
(verbs::PolicyPreviewResponse.policy_version) — the version of the policy
these decisions were evaluated against. The response struct previously had
no field for it, so it was silently dropped (gate376 flagged
policy_version DROPPED). Capture it so --output json faithfully reports
which policy version produced the decisions. #[serde(default)] on the
struct keeps this back-compat for responses that omit it (→ None).
Trait Implementations§
Source§impl Clone for PolicyPreviewResponse
impl Clone for PolicyPreviewResponse
Source§fn clone(&self) -> PolicyPreviewResponse
fn clone(&self) -> PolicyPreviewResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more