pub struct PromotionGate {
pub required_invariants: Vec<String>,
pub required_truths: Vec<String>,
pub authority: AuthorityPolicy,
pub decision: GateDecision,
pub rationale: String,
}Expand description
Promotion gate for plan approval
Fields§
§required_invariants: Vec<String>Invariants that must hold
required_truths: Vec<String>Business truths that must be verified
Who can promote this plan
decision: GateDecisionThe gate decision
rationale: StringRationale for the decision
Implementations§
Source§impl PromotionGate
impl PromotionGate
Sourcepub fn auto_promote(rationale: impl Into<String>) -> Self
pub fn auto_promote(rationale: impl Into<String>) -> Self
Create a gate that promotes automatically
Sourcepub fn requires_review(
required_truths: Vec<String>,
rationale: impl Into<String>,
) -> Self
pub fn requires_review( required_truths: Vec<String>, rationale: impl Into<String>, ) -> Self
Create a gate that requires human review
Sourcepub fn with_invariants(
required_invariants: Vec<String>,
decision: GateDecision,
rationale: impl Into<String>,
) -> Self
pub fn with_invariants( required_invariants: Vec<String>, decision: GateDecision, rationale: impl Into<String>, ) -> Self
Create a gate with invariant requirements
Sourcepub fn is_promoted(&self) -> bool
pub fn is_promoted(&self) -> bool
Check if this gate promotes the plan
Sourcepub fn is_rejected(&self) -> bool
pub fn is_rejected(&self) -> bool
Check if this gate rejects the plan
Sourcepub fn requires_escalation(&self) -> bool
pub fn requires_escalation(&self) -> bool
Check if this gate requires escalation
Sourcepub fn requires_human(&self) -> bool
pub fn requires_human(&self) -> bool
Check if human approval is required
Trait Implementations§
Source§impl Clone for PromotionGate
impl Clone for PromotionGate
Source§fn clone(&self) -> PromotionGate
fn clone(&self) -> PromotionGate
Returns a duplicate of the value. Read more
1.0.0 · 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 PromotionGate
impl Debug for PromotionGate
Source§impl<'de> Deserialize<'de> for PromotionGate
impl<'de> Deserialize<'de> for PromotionGate
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 PromotionGate
impl RefUnwindSafe for PromotionGate
impl Send for PromotionGate
impl Sync for PromotionGate
impl Unpin for PromotionGate
impl UnsafeUnpin for PromotionGate
impl UnwindSafe for PromotionGate
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