pub struct ShellExecOptions<'a> {
pub cwd: Option<PathBuf>,
pub env: Option<HashMap<String, String>>,
pub inherit_env: bool,
pub timeout: Option<f64>,
pub cancel: Option<&'a CancellationToken>,
pub on_stdout: Option<Box<dyn FnMut(&str) + Send + 'a>>,
pub on_stderr: Option<Box<dyn FnMut(&str) + Send + 'a>>,
}Expand description
Mirrors TS ShellExecOptions (note: timeout is in seconds, matching
the TS contract). on_stdout / on_stderr fire per chunk, interleaved in
arrival order; the bash-tool wraps these with throttling + capture.
Fields§
§cwd: Option<PathBuf>§env: Option<HashMap<String, String>>§inherit_env: boolDefault true. When false, ONLY env is used (no process env, no
shell base env).
timeout: Option<f64>Seconds. None = no timeout.
cancel: Option<&'a CancellationToken>§on_stdout: Option<Box<dyn FnMut(&str) + Send + 'a>>§on_stderr: Option<Box<dyn FnMut(&str) + Send + 'a>>Implementations§
Source§impl<'a> ShellExecOptions<'a>
impl<'a> ShellExecOptions<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ShellExecOptions<'a>
impl<'a> !Sync for ShellExecOptions<'a>
impl<'a> !UnwindSafe for ShellExecOptions<'a>
impl<'a> Freeze for ShellExecOptions<'a>
impl<'a> Send for ShellExecOptions<'a>
impl<'a> Unpin for ShellExecOptions<'a>
impl<'a> UnsafeUnpin for ShellExecOptions<'a>
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