Struct std::sys::windows::process::Command

source ·
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

source

pub fn new(program: &OsStr) -> Command

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn arg(&mut self, arg: &OsStr)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn env_mut(&mut self) -> &mut CommandEnv

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn cwd(&mut self, dir: &OsStr)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn stdin(&mut self, stdin: Stdio)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn stdout(&mut self, stdout: Stdio)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn stderr(&mut self, stderr: Stdio)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn creation_flags(&mut self, flags: u32)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn force_quotes(&mut self, enabled: bool)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn raw_arg(&mut self, command_str_to_append: &OsStr)

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn get_program(&self) -> &OsStr

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn get_args(&self) -> CommandArgs<'_>

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn get_envs(&self) -> CommandEnvs<'_>

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn get_current_dir(&self) -> Option<&Path>

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn spawn( &mut self, default: Stdio, needs_stdin: bool ) -> Result<(Process, StdioPipes)>

🔬This is a nightly-only experimental API. (process_internals)
source

pub fn output(&mut self) -> Result<(ExitStatus, Vec<u8>, Vec<u8>)>

🔬This is a nightly-only experimental API. (process_internals)

Trait Implementations§

source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.