pub struct ApprovalGateConfig {
pub name: String,
pub description: Option<String>,
pub approvers: Vec<String>,
pub policy: ApprovalPolicy,
pub auto_approve_after: Option<Duration>,
pub timeout: Option<Duration>,
pub escalation_rules: Vec<EscalationRule>,
pub metadata: HashMap<String, String>,
}Expand description
Configuration for an approval gate.
Fields§
§name: StringHuman-readable name for this gate.
description: Option<String>Description of what is being approved.
approvers: Vec<String>Who can approve this gate.
policy: ApprovalPolicyPolicy governing how many approvals are needed.
auto_approve_after: Option<Duration>If set, the gate auto-approves after this duration.
timeout: Option<Duration>If set, the gate times out after this duration.
escalation_rules: Vec<EscalationRule>Escalation rules (applied in order).
metadata: HashMap<String, String>Metadata attached to this gate.
Implementations§
Source§impl ApprovalGateConfig
impl ApprovalGateConfig
Sourcepub fn new(
name: impl Into<String>,
approvers: Vec<String>,
policy: ApprovalPolicy,
) -> Self
pub fn new( name: impl Into<String>, approvers: Vec<String>, policy: ApprovalPolicy, ) -> Self
Create a new approval gate configuration.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the gate description.
Sourcepub fn with_auto_approve(self, after: Duration) -> Self
pub fn with_auto_approve(self, after: Duration) -> Self
Set auto-approve timeout.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the hard timeout.
Sourcepub fn add_escalation(self, rule: EscalationRule) -> Self
pub fn add_escalation(self, rule: EscalationRule) -> Self
Add an escalation rule.
Trait Implementations§
Source§impl Clone for ApprovalGateConfig
impl Clone for ApprovalGateConfig
Source§fn clone(&self) -> ApprovalGateConfig
fn clone(&self) -> ApprovalGateConfig
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 moreAuto Trait Implementations§
impl Freeze for ApprovalGateConfig
impl RefUnwindSafe for ApprovalGateConfig
impl Send for ApprovalGateConfig
impl Sync for ApprovalGateConfig
impl Unpin for ApprovalGateConfig
impl UnsafeUnpin for ApprovalGateConfig
impl UnwindSafe for ApprovalGateConfig
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