pub enum StepCondition {
Always,
Never,
Compare {
variable: String,
op: ComparisonOp,
value: ConditionValue,
},
Exists {
variable: String,
},
And(Vec<StepCondition>),
Or(Vec<StepCondition>),
Not(Box<StepCondition>),
StepStatus {
step_name: String,
expected_status: String,
},
Expression(String),
}Expand description
A condition that can be evaluated against a context.
Variants§
Always
Always true.
Never
Always false.
Compare
Compare a named variable to a literal value.
Exists
Check if a variable exists in the context.
And(Vec<StepCondition>)
Logical AND of sub-conditions.
Or(Vec<StepCondition>)
Logical OR of sub-conditions.
Not(Box<StepCondition>)
Logical NOT.
StepStatus
Check that a previous step completed with a specific status.
Fields
Expression(String)
Evaluate a simple expression string.
Trait Implementations§
Source§impl Clone for StepCondition
impl Clone for StepCondition
Source§fn clone(&self) -> StepCondition
fn clone(&self) -> StepCondition
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 StepCondition
impl RefUnwindSafe for StepCondition
impl Send for StepCondition
impl Sync for StepCondition
impl Unpin for StepCondition
impl UnsafeUnpin for StepCondition
impl UnwindSafe for StepCondition
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