pub struct Command {
pub exe: Exe,
pub wd: Option<Directory>,
pub argv: Argv,
pub env: EnvModifications,
}
Expand description
<exe={exe}, wd={wd:?}, argv={argv}, env={env}>
Request to execute a subprocess. See crate::sync
and crate::stream
for examples of invocation.
Fields§
§exe: Exe
Executable name, which may be absolute or relative to $PATH
entries.
wd: Option<Directory>
The working directory for the child process; otherwise, the working directory is inherited from the parent process.
argv: Argv
Arguments to pass to the executable. These should not be quoted at all.
env: EnvModifications
Any new environment variables to set within the child process. The environment is otherwise inherited from the parent.
Implementations§
Trait Implementations§
Source§impl Streamable for Command
impl Streamable for Command
Source§fn invoke_streaming(self) -> Result<Streaming, CommandErrorWrapper>
fn invoke_streaming(self) -> Result<Streaming, CommandErrorWrapper>
Invoke a child process and return a handle to its output streams.
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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