pub struct PolicyDecision {
pub ecosystem: String,
pub package: String,
pub version: String,
pub decision: String,
pub reason: String,
pub verdict_id: Option<String>,
pub policy_rule_id: Option<String>,
pub error: Option<String>,
}Expand description
Per-package decision returned from /v1/policy/preview or
embedded in audit entries.
Fields§
§ecosystem: String§package: String§version: String§decision: StringALLOW | DENY | WARN | INSUFFICIENT_DATA | RISK_ACCEPTANCE_REQUIRED
reason: String§verdict_id: Option<String>§policy_rule_id: Option<String>§error: Option<String>CLEANLIB-616: set when this coordinate could NOT be evaluated — a per-package
scan error, or a chunk that failed/returned no result (mirrors
ScanResult.error). Lets --output json distinguish a NEVER-EVALUATED
coordinate from one that was evaluated and warned: both surface as a WARN
decision, but only the unevaluated one carries error. None (and
omitted from JSON) on an evaluated coordinate.
Trait Implementations§
Source§impl Clone for PolicyDecision
impl Clone for PolicyDecision
Source§fn clone(&self) -> PolicyDecision
fn clone(&self) -> PolicyDecision
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 PolicyDecision
impl Debug for PolicyDecision
Source§impl Default for PolicyDecision
impl Default for PolicyDecision
Source§fn default() -> PolicyDecision
fn default() -> PolicyDecision
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PolicyDecisionwhere
PolicyDecision: Default,
impl<'de> Deserialize<'de> for PolicyDecisionwhere
PolicyDecision: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
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<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