pub struct ConditionContext {
pub variables: HashMap<String, ConditionValue>,
pub step_results: HashMap<String, String>,
}Expand description
Context used to evaluate conditions.
Fields§
§variables: HashMap<String, ConditionValue>Variables available for condition evaluation.
step_results: HashMap<String, String>Results from previous steps keyed by step name.
Implementations§
Source§impl ConditionContext
impl ConditionContext
Sourcepub fn set_variable(&mut self, name: impl Into<String>, value: ConditionValue)
pub fn set_variable(&mut self, name: impl Into<String>, value: ConditionValue)
Set a variable.
Sourcepub fn set_step_result(
&mut self,
step_name: impl Into<String>,
status: impl Into<String>,
)
pub fn set_step_result( &mut self, step_name: impl Into<String>, status: impl Into<String>, )
Set a step result.
Sourcepub fn get_variable(&self, name: &str) -> Option<&ConditionValue>
pub fn get_variable(&self, name: &str) -> Option<&ConditionValue>
Get a variable by name.
Sourcepub fn get_step_result(&self, step_name: &str) -> Option<&str>
pub fn get_step_result(&self, step_name: &str) -> Option<&str>
Get a step result by step name.
Sourcepub fn variable_count(&self) -> usize
pub fn variable_count(&self) -> usize
Return the number of variables.
Sourcepub fn step_result_count(&self) -> usize
pub fn step_result_count(&self) -> usize
Return the number of step results.
Trait Implementations§
Source§impl Clone for ConditionContext
impl Clone for ConditionContext
Source§fn clone(&self) -> ConditionContext
fn clone(&self) -> ConditionContext
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 ConditionContext
impl Debug for ConditionContext
Auto Trait Implementations§
impl Freeze for ConditionContext
impl RefUnwindSafe for ConditionContext
impl Send for ConditionContext
impl Sync for ConditionContext
impl Unpin for ConditionContext
impl UnsafeUnpin for ConditionContext
impl UnwindSafe for ConditionContext
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