pub struct ExecOpts {
pub cwd: Option<PathBuf>,
pub timeout: Duration,
pub check: bool,
pub env: Vec<(String, String)>,
pub stdin: Option<String>,
}Fields§
§cwd: Option<PathBuf>§timeout: Duration§check: boolWhen false, a non-zero exit returns stdout instead of an error.
env: Vec<(String, String)>§stdin: Option<String>Implementations§
Source§impl ExecOpts
impl ExecOpts
pub fn new() -> Self
pub fn cwd(self, path: impl AsRef<Path>) -> Self
pub fn cwd_opt(self, path: Option<PathBuf>) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
pub fn check(self, value: bool) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecOpts
impl RefUnwindSafe for ExecOpts
impl Send for ExecOpts
impl Sync for ExecOpts
impl Unpin for ExecOpts
impl UnsafeUnpin for ExecOpts
impl UnwindSafe for ExecOpts
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