pub struct PolicyPreviewResponse {
pub decisions: Vec<PolicyDecision>,
pub policy_version: Option<String>,
pub request_id: 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).
request_id: Option<String>CLEANLIB-480 · the x-request-id header the App emits on every
response (per CLEANLIB-470, live on all 4 response classes). Populated
from the RESPONSE HEADER by transport::Client::policy_preview after
the JSON body has been parsed — the wire body itself carries no
request_id field (#[serde(default)] → None on deserialize).
SDK callers doing correlation debugging (e.g. partner reporting an
issue, log correlation) read this directly instead of falling back
to a raw HTTP client bypass.
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