pub struct CommandOptions {
pub env: Vec<(String, String)>,
pub timeout: Option<Duration>,
pub dir: Option<PathBuf>,
pub clear_env: bool,
}Expand description
How to run one external command, beyond its program and arguments.
Fields§
§env: Vec<(String, String)>Variables set for the command only, on top of the environment it inherits. The calling process’s own environment is never changed.
timeout: Option<Duration>Kill the command, and everything it started, once it has run this long.
dir: Option<PathBuf>The folder the command runs in. None runs it in the work dir.
clear_env: boolStart from an empty environment plus a short allowlist (PATH, HOME,
locale, …) instead of inheriting everything, then add env. For
script mode, so the user’s exported secrets and shell startup hooks
never reach a script that didn’t ask for them.
Trait Implementations§
Source§impl Clone for CommandOptions
impl Clone for CommandOptions
Source§impl Debug for CommandOptions
impl Debug for CommandOptions
Source§impl Default for CommandOptions
impl Default for CommandOptions
impl Eq for CommandOptions
Source§impl PartialEq for CommandOptions
impl PartialEq for CommandOptions
impl StructuralPartialEq for CommandOptions
Auto Trait Implementations§
impl Freeze for CommandOptions
impl RefUnwindSafe for CommandOptions
impl Send for CommandOptions
impl Sync for CommandOptions
impl Unpin for CommandOptions
impl UnsafeUnpin for CommandOptions
impl UnwindSafe for CommandOptions
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