pub struct ApprovalCondition {
pub risk_gte: Option<RiskLevel>,
pub risk_eq: Option<RiskLevel>,
pub files_changed_gt: Option<u32>,
pub files_changed_lte: Option<u32>,
pub path_matches: Option<String>,
pub tests_all_passed: Option<bool>,
pub touches_off_limits: Option<bool>,
pub phase: Option<String>,
pub time_outside: Option<String>,
pub consecutive_failures_gte: Option<u32>,
}Expand description
Flat condition struct — all specified fields must be true (AND semantics). Unspecified fields (None) are wildcards.
Fields§
§risk_gte: Option<RiskLevel>Risk level must be >= this threshold.
risk_eq: Option<RiskLevel>Risk level must equal this value.
files_changed_gt: Option<u32>Number of changed files must be > N.
files_changed_lte: Option<u32>Number of changed files must be <= N.
path_matches: Option<String>Glob pattern — at least one changed file path must match.
tests_all_passed: Option<bool>Whether all tests must have passed.
touches_off_limits: Option<bool>Whether off-limits files are touched.
phase: Option<String>Current agent phase must match.
time_outside: Option<String>Time range “HH:MM-HH:MM” — matches when current time is OUTSIDE this range.
consecutive_failures_gte: Option<u32>Consecutive failure count must be >= N.
Implementations§
Source§impl ApprovalCondition
impl ApprovalCondition
Sourcepub fn matches(&self, ctx: &EvalContext<'_>) -> bool
pub fn matches(&self, ctx: &EvalContext<'_>) -> bool
Check if this condition matches the given evaluation context. All specified fields must be true (AND semantics).
Trait Implementations§
Source§impl Clone for ApprovalCondition
impl Clone for ApprovalCondition
Source§fn clone(&self) -> ApprovalCondition
fn clone(&self) -> ApprovalCondition
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 ApprovalCondition
impl Debug for ApprovalCondition
Source§impl Default for ApprovalCondition
impl Default for ApprovalCondition
Source§fn default() -> ApprovalCondition
fn default() -> ApprovalCondition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApprovalCondition
impl<'de> Deserialize<'de> for ApprovalCondition
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 ApprovalCondition
impl RefUnwindSafe for ApprovalCondition
impl Send for ApprovalCondition
impl Sync for ApprovalCondition
impl Unpin for ApprovalCondition
impl UnsafeUnpin for ApprovalCondition
impl UnwindSafe for ApprovalCondition
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