pub trait ProcessExt: Sealed {
// Provided methods
fn command<S: AsRef<OsStr>>(program: S) -> Command { ... }
fn command_shell(line: &str) -> Result<Command, ShellWordError> ⓘ { ... }
fn abort() -> ! { ... }
fn exit(code: i32) -> ! { ... }
fn self_pid() -> u32 { ... }
}Available on crate feature
std only.Expand description
🖥️ 🧵 🛠️
Extension trait providing additional methods for Processes.
It offers the standalone functions in std::process as associated methods.
Provided Methods§
Sourcefn command<S: AsRef<OsStr>>(program: S) -> Command
fn command<S: AsRef<OsStr>>(program: S) -> Command
Constructs a new Command for launching the program.
See Command::new.
Sourcefn command_shell(line: &str) -> Result<Command, ShellWordError> ⓘ
Available on crate feature shell only.
fn command_shell(line: &str) -> Result<Command, ShellWordError> ⓘ
shell only.Constructs a new Command from shell-like command words.
This does not invoke a shell. It only uses shell word syntax to split
line into a program and arguments.
§Errors
Returns an error if line does not contain a program word, contains
invalid shell word syntax, or contains a decoded word that is not UTF-8.
Sourcefn abort() -> !
fn abort() -> !
Terminates the current process in an abnormal fashion.
See std::process::abort.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".