pub struct ShellConfig {
pub command: String,
pub timeout_secs: Option<u64>,
pub dir: Option<String>,
pub env: Vec<(String, String)>,
pub clean_env: bool,
}Expand description
Serializable configuration for a shell step.
§Examples
use ironflow_engine::config::ShellConfig;
let config = ShellConfig::new("cargo build --release")
.timeout_secs(300)
.dir("/app");Fields§
§command: StringThe shell command to execute.
timeout_secs: Option<u64>Timeout in seconds (default: 300).
dir: Option<String>Working directory.
env: Vec<(String, String)>Environment variables to set.
clean_env: boolIf true, start with a clean environment.
Implementations§
Source§impl ShellConfig
impl ShellConfig
Sourcepub fn new(command: &str) -> Self
pub fn new(command: &str) -> Self
Create a new shell config with the given command.
§Examples
use ironflow_engine::config::ShellConfig;
let config = ShellConfig::new("echo hello");
assert_eq!(config.command, "echo hello");Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Set the timeout in seconds.
Trait Implementations§
Source§impl Clone for ShellConfig
impl Clone for ShellConfig
Source§fn clone(&self) -> ShellConfig
fn clone(&self) -> ShellConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ShellConfig
impl Debug for ShellConfig
Source§impl<'de> Deserialize<'de> for ShellConfig
impl<'de> Deserialize<'de> for ShellConfig
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
Auto Trait Implementations§
impl Freeze for ShellConfig
impl RefUnwindSafe for ShellConfig
impl Send for ShellConfig
impl Sync for ShellConfig
impl Unpin for ShellConfig
impl UnsafeUnpin for ShellConfig
impl UnwindSafe for ShellConfig
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