doc.rust-lang.org
pub fn env_remove<K>(&mut self, key: K) -> &mut Command
Removes an explicitly set environment variable and prevents inheriting it from a parent process.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn env_clear(&mut self) -> &mut Command
Clears all explicitly set environment variables and prevents inheriting any parent process environment variables.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Command
Inserts or updates an explicit environment variable mapping.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn current_dir<P>(&mut self, dir: P) -> &mut Command
Sets the working directory for the child process.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn args<I, S>(&mut self, args: I) -> &mut Command
Adds multiple arguments to pass to the program.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn arg<S>(&mut self, arg: S) -> &mut Command
Adds an argument to pass to the program.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Command
A process builder, providing fine-grained control over how a new process should be spawned.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ChildStdout
A handle to a child process's standard output (stdout).
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ChildStdin
A handle to a child process's standard input (stdin).
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ChildStderr
A handle to a child process's stderr.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn wait_with_output(self) -> io::Result<Output>
Simultaneously waits for the child to exit and collect all remaining output on the stdout/stderr handles, returning an Output instance.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn wait(&mut self) -> io::Result<ExitStatus>
Waits for the child to exit completely, returning the status that it exited with. This function will continue to have the same return value after it has been called at least once.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>
Attempts to collect the exit status of the child if it has already exited.
method
std
Stable since 1.18.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn kill(&mut self) -> io::Result<()>
Forces the child process to exit. If the child has already exited, Ok(()) is returned.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn id(&self) -> u32
Returns the OS-assigned process identifier associated with this child.
method
std
Stable since 1.3.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Child
Representation of a running or exited child process.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod process
A module for working with processes.
module
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro println!
Prints to the standard output, with a newline.
macro
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro print!
Prints to the standard output.
macro
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod v1
The first version of the prelude of The Rust Standard Library.
module
std
Stable since 1.0.0
Version 1.100.0-nightly