Add method to check constraints for workflow state
This change adds a method to the `WorkflowState` struct to check if a
constraint is in the `constraints` field of the state.
@@ -63,6 +63,10 @@ impl WorkflowState {
aliases
}
+ pub fn has_constraint(&self, constraint: &str) -> bool {
+ self.constraints.contains(&constraint.to_string())
+ }
+
pub fn name(&self) -> &str {
&self.name
}
