pub struct ProcessConfig {
pub executable: PathBuf,
pub working_dir: Option<PathBuf>,
pub env: Vec<(String, String)>,
pub timeout: Option<Duration>,
pub capture_stdout: bool,
pub capture_stderr: bool,
pub pipe_stdin: bool,
}
Expand description
Process execution configuration
Fields§
§executable: PathBuf
Executable path
working_dir: Option<PathBuf>
Working directory
env: Vec<(String, String)>
Environment variables
timeout: Option<Duration>
Timeout for the process
capture_stdout: bool
Whether to capture stdout
capture_stderr: bool
Whether to capture stderr
pipe_stdin: bool
Whether to pipe stdin
Implementations§
Source§impl ProcessConfig
impl ProcessConfig
Sourcepub fn working_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn working_dir(self, dir: impl Into<PathBuf>) -> Self
Set working directory
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add environment variable
Sourcepub fn capture_stdout(self, capture: bool) -> Self
pub fn capture_stdout(self, capture: bool) -> Self
Set stdout capture
Sourcepub fn capture_stderr(self, capture: bool) -> Self
pub fn capture_stderr(self, capture: bool) -> Self
Set stderr capture
Sourcepub fn pipe_stdin(self, pipe: bool) -> Self
pub fn pipe_stdin(self, pipe: bool) -> Self
Set stdin piping
Trait Implementations§
Source§impl Clone for ProcessConfig
impl Clone for ProcessConfig
Source§fn clone(&self) -> ProcessConfig
fn clone(&self) -> ProcessConfig
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 moreAuto Trait Implementations§
impl Freeze for ProcessConfig
impl RefUnwindSafe for ProcessConfig
impl Send for ProcessConfig
impl Sync for ProcessConfig
impl Unpin for ProcessConfig
impl UnwindSafe for ProcessConfig
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