pub enum StepConfig {
Shell(ShellConfig),
Http(HttpConfig),
Agent(AgentStepConfig),
Workflow(WorkflowStepConfig),
Approval(ApprovalConfig),
}Expand description
A serializable step configuration, wrapping one of the operation-specific configs.
Stored as JSON in the steps.input column and reconstructed by the
executor at runtime.
§Examples
use ironflow_engine::config::{StepConfig, ShellConfig};
let config = StepConfig::Shell(ShellConfig::new("echo hello"));
let json = serde_json::to_string(&config).unwrap();
assert!(json.contains("echo hello"));Variants§
Shell(ShellConfig)
A shell command step.
Http(HttpConfig)
An HTTP request step.
Agent(AgentStepConfig)
An AI agent step.
Workflow(WorkflowStepConfig)
A sub-workflow invocation step.
Approval(ApprovalConfig)
A human approval gate step.
Implementations§
Source§impl StepConfig
impl StepConfig
Sourcepub fn allow_failure(&self) -> bool
pub fn allow_failure(&self) -> bool
Whether this step is allowed to fail without stopping the run.
§Examples
use ironflow_engine::config::{StepConfig, ShellConfig};
let config = StepConfig::Shell(ShellConfig::new("cargo clippy").allow_failure());
assert!(config.allow_failure());
let config = StepConfig::Shell(ShellConfig::new("cargo build"));
assert!(!config.allow_failure());Sourcepub fn retry(&self) -> Option<&RetryPolicy>
pub fn retry(&self) -> Option<&RetryPolicy>
Get the step-level retry policy, if any.
§Examples
use ironflow_core::retry::RetryPolicy;
use ironflow_engine::config::{StepConfig, ShellConfig};
let config = StepConfig::Shell(ShellConfig::new("echo test").retry_policy(RetryPolicy::new(3)));
assert!(config.retry().is_some());
let config = StepConfig::Shell(ShellConfig::new("echo test"));
assert!(config.retry().is_none());Sourcepub fn kind(&self) -> StepKind
pub fn kind(&self) -> StepKind
Get the kind of step this configuration represents.
§Examples
use ironflow_engine::config::{StepConfig, ShellConfig};
use ironflow_store::entities::StepKind;
let config = StepConfig::Shell(ShellConfig::new("echo test"));
assert_eq!(config.kind(), StepKind::Shell);Trait Implementations§
Source§impl Clone for StepConfig
impl Clone for StepConfig
Source§fn clone(&self) -> StepConfig
fn clone(&self) -> StepConfig
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 StepConfig
impl Debug for StepConfig
Source§impl<'de> Deserialize<'de> for StepConfig
impl<'de> Deserialize<'de> for StepConfig
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
Source§impl From<AgentConfig> for StepConfig
impl From<AgentConfig> for StepConfig
Source§fn from(c: AgentStepConfig) -> Self
fn from(c: AgentStepConfig) -> Self
Converts to this type from the input type.
Source§impl From<HttpConfig> for StepConfig
impl From<HttpConfig> for StepConfig
Source§fn from(c: HttpConfig) -> Self
fn from(c: HttpConfig) -> Self
Converts to this type from the input type.
Source§impl From<ShellConfig> for StepConfig
impl From<ShellConfig> for StepConfig
Source§fn from(c: ShellConfig) -> Self
fn from(c: ShellConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StepConfig
impl RefUnwindSafe for StepConfig
impl Send for StepConfig
impl Sync for StepConfig
impl Unpin for StepConfig
impl UnsafeUnpin for StepConfig
impl UnwindSafe for StepConfig
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