pub struct WorkflowOptions {
pub allow_failure: bool,
/* private fields */
}Expand description
Options of a sub-workflow step started with
workflow_with.
§Examples
use ironflow_engine::config::WorkflowOptions;
let options = WorkflowOptions::new().allow_failure();
assert!(options.allow_failure);
assert!(!WorkflowOptions::default().allow_failure);Fields§
§allow_failure: boolTolerate a failed child run instead of failing the parent.
Implementations§
Source§impl WorkflowOptions
impl WorkflowOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create options with every flag off.
§Examples
use ironflow_engine::config::WorkflowOptions;
assert_eq!(WorkflowOptions::new(), WorkflowOptions::default());Sourcepub fn allow_failure(self) -> Self
pub fn allow_failure(self) -> Self
Tolerate a failed child run: the step completes with the failure in its
output and the parent run ends as Warning. A suspension is never
tolerated.
§Examples
use ironflow_engine::config::WorkflowOptions;
assert!(WorkflowOptions::new().allow_failure().allow_failure);Sourcepub fn concurrency_key(self, key: impl Into<String>) -> Self
pub fn concurrency_key(self, key: impl Into<String>) -> Self
Make the child run exclusive on key.
While another non-terminal run (Pending, Running, Retrying, Sleeping,
AwaitingApproval) holds the same key, no child run is created and the
step completes with a
SubWorkflowOutcome::Conflict.
§Panics
Panics if key is empty or only whitespace, or longer than
MAX_CONCURRENCY_KEY_LEN bytes.
§Examples
use ironflow_engine::config::WorkflowOptions;
let options = WorkflowOptions::new().concurrency_key("issue:12");
assert_eq!(options.concurrency_key_ref(), Some("issue:12"));ⓘ
use ironflow_engine::config::WorkflowOptions;
WorkflowOptions::new().concurrency_key(" ");Sourcepub fn concurrency_key_ref(&self) -> Option<&str>
pub fn concurrency_key_ref(&self) -> Option<&str>
The concurrency key, if one was set.
§Examples
use ironflow_engine::config::WorkflowOptions;
let options = WorkflowOptions::new().concurrency_key("deploy:prod");
assert_eq!(options.concurrency_key_ref(), Some("deploy:prod"));Trait Implementations§
Source§impl Clone for WorkflowOptions
impl Clone for WorkflowOptions
Source§impl Debug for WorkflowOptions
impl Debug for WorkflowOptions
Source§impl Default for WorkflowOptions
impl Default for WorkflowOptions
impl Eq for WorkflowOptions
Source§impl PartialEq for WorkflowOptions
impl PartialEq for WorkflowOptions
impl StructuralPartialEq for WorkflowOptions
Auto Trait Implementations§
impl Freeze for WorkflowOptions
impl RefUnwindSafe for WorkflowOptions
impl Send for WorkflowOptions
impl Sync for WorkflowOptions
impl Unpin for WorkflowOptions
impl UnsafeUnpin for WorkflowOptions
impl UnwindSafe for WorkflowOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.