pub enum PromotionError {
NotValidated {
proposal_id: String,
},
ValidationFailed {
reason: String,
},
GateRejected {
gate_id: String,
reason: String,
},
MissingEvidence(String),
HumanApprovalRequired,
PolicyVersionMismatch {
expected: String,
actual: String,
},
ReportMismatch {
proposal_id: String,
report_proposal_id: String,
},
}Expand description
Errors during fact promotion.
Variants§
NotValidated
Proposal not validated.
ValidationFailed
Validation failed during promotion.
GateRejected
Gate rejected the promotion.
MissingEvidence(String)
Missing evidence for promotion.
HumanApprovalRequired
Human approval required.
PolicyVersionMismatch
Policy version mismatch.
ReportMismatch
Validation report mismatch (report doesn’t match proposal).
Implementations§
Source§impl PromotionError
impl PromotionError
Sourcepub fn not_validated(proposal_id: impl Into<String>) -> PromotionError
pub fn not_validated(proposal_id: impl Into<String>) -> PromotionError
Create a not validated error.
Sourcepub fn validation_failed(reason: impl Into<String>) -> PromotionError
pub fn validation_failed(reason: impl Into<String>) -> PromotionError
Create a validation failed error.
Sourcepub fn gate_rejected(
gate_id: impl Into<String>,
reason: impl Into<String>,
) -> PromotionError
pub fn gate_rejected( gate_id: impl Into<String>, reason: impl Into<String>, ) -> PromotionError
Create a gate rejected error.
Sourcepub fn missing_evidence(description: impl Into<String>) -> PromotionError
pub fn missing_evidence(description: impl Into<String>) -> PromotionError
Create a missing evidence error.
Sourcepub fn report_mismatch(
proposal_id: impl Display,
report_proposal_id: impl Display,
) -> PromotionError
pub fn report_mismatch( proposal_id: impl Display, report_proposal_id: impl Display, ) -> PromotionError
Create a report mismatch error.
Trait Implementations§
Source§impl Debug for PromotionError
impl Debug for PromotionError
Source§impl Display for PromotionError
impl Display for PromotionError
Source§impl Error for PromotionError
impl Error for PromotionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PromotionError
impl RefUnwindSafe for PromotionError
impl Send for PromotionError
impl Sync for PromotionError
impl Unpin for PromotionError
impl UnsafeUnpin for PromotionError
impl UnwindSafe for PromotionError
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