pub struct ProofRefusal {
pub refused: bool,
pub category: String,
pub reason: ProofRefusalReason,
pub incident_reason: IncidentReasonCode,
pub detail: String,
}Expand description
The durable JSON envelope for a proof-mode refusal. category is fixed to
admission_denial so a consumer never confuses a proof refusal (nothing
ran) with a product compile/test failure (something ran and failed).
Fields§
§refused: boolAlways true — this envelope only exists for refusals.
category: StringFixed discriminator distinguishing this from a product failure.
reason: ProofRefusalReasonThe refusal reason token.
incident_reason: IncidentReasonCodeThe stable incident reason code (RCH-I012 proof refusal).
detail: StringOperator-facing detail.
Implementations§
Source§impl ProofRefusal
impl ProofRefusal
Sourcepub fn new(reason: ProofRefusalReason) -> Self
pub fn new(reason: ProofRefusalReason) -> Self
Build a refusal envelope from a reason.
Sourcepub fn from_verdict(verdict: &ProofVerdict) -> Option<Self>
pub fn from_verdict(verdict: &ProofVerdict) -> Option<Self>
Build a refusal envelope from a verdict, if it refused.
Sourcepub fn is_admission_denial(&self) -> bool
pub fn is_admission_denial(&self) -> bool
Whether this denial is an admission/policy denial (always true) — i.e. NOT a product compile/test failure.
Trait Implementations§
Source§impl Clone for ProofRefusal
impl Clone for ProofRefusal
Source§impl Debug for ProofRefusal
impl Debug for ProofRefusal
Source§impl<'de> Deserialize<'de> for ProofRefusal
impl<'de> Deserialize<'de> for ProofRefusal
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
impl Eq for ProofRefusal
Source§impl PartialEq for ProofRefusal
impl PartialEq for ProofRefusal
Source§impl Serialize for ProofRefusal
impl Serialize for ProofRefusal
impl StructuralPartialEq for ProofRefusal
Auto Trait Implementations§
impl Freeze for ProofRefusal
impl RefUnwindSafe for ProofRefusal
impl Send for ProofRefusal
impl Sync for ProofRefusal
impl Unpin for ProofRefusal
impl UnsafeUnpin for ProofRefusal
impl UnwindSafe for ProofRefusal
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.