pub struct Command {
program: OsString,
args: Vec<Arg>,
env: CommandEnv,
cwd: Option<OsString>,
flags: u32,
detach: bool,
stdin: Option<Stdio>,
stdout: Option<Stdio>,
stderr: Option<Stdio>,
force_quotes_enabled: bool,
}
🔬This is a nightly-only experimental API. (
process_internals
)Fields§
§program: OsString
🔬This is a nightly-only experimental API. (
§process_internals
)args: Vec<Arg>
🔬This is a nightly-only experimental API. (
§process_internals
)env: CommandEnv
🔬This is a nightly-only experimental API. (
§process_internals
)cwd: Option<OsString>
🔬This is a nightly-only experimental API. (
§process_internals
)flags: u32
🔬This is a nightly-only experimental API. (
§process_internals
)detach: bool
🔬This is a nightly-only experimental API. (
§process_internals
)stdin: Option<Stdio>
🔬This is a nightly-only experimental API. (
§process_internals
)stdout: Option<Stdio>
🔬This is a nightly-only experimental API. (
§process_internals
)stderr: Option<Stdio>
🔬This is a nightly-only experimental API. (
§process_internals
)force_quotes_enabled: bool
🔬This is a nightly-only experimental API. (
process_internals
)Implementations§
source§impl Command
impl Command
pub fn new(program: &OsStr) -> Command
🔬This is a nightly-only experimental API. (
process_internals
)pub fn arg(&mut self, arg: &OsStr)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn env_mut(&mut self) -> &mut CommandEnv
🔬This is a nightly-only experimental API. (
process_internals
)pub fn cwd(&mut self, dir: &OsStr)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn stdin(&mut self, stdin: Stdio)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn stdout(&mut self, stdout: Stdio)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn stderr(&mut self, stderr: Stdio)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn creation_flags(&mut self, flags: u32)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn force_quotes(&mut self, enabled: bool)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn raw_arg(&mut self, command_str_to_append: &OsStr)
🔬This is a nightly-only experimental API. (
process_internals
)pub fn get_program(&self) -> &OsStr
🔬This is a nightly-only experimental API. (
process_internals
)pub fn get_args(&self) -> CommandArgs<'_> ⓘ
🔬This is a nightly-only experimental API. (
process_internals
)pub fn get_envs(&self) -> CommandEnvs<'_> ⓘ
🔬This is a nightly-only experimental API. (
process_internals
)pub fn get_current_dir(&self) -> Option<&Path>
🔬This is a nightly-only experimental API. (
process_internals
)pub fn spawn( &mut self, default: Stdio, needs_stdin: bool ) -> Result<(Process, StdioPipes)>
🔬This is a nightly-only experimental API. (
process_internals
)pub fn output(&mut self) -> Result<(ExitStatus, Vec<u8>, Vec<u8>)>
🔬This is a nightly-only experimental API. (
process_internals
)Trait Implementations§
Auto Trait Implementations§
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