Trait CommandExt

Source
pub trait CommandExt: Sealed {
    // Required methods
    fn creation_flags(&mut self, flags: u32) -> &mut Command;
    fn raw_arg<S: AsRef<OsStr>>(
        &mut self,
        text_to_append_as_is: S,
    ) -> &mut Command;
}
Expand description

Windows-specific extensions to the Command builder.

This trait is sealed: it cannot be implemented outside async-process. This is so that future additional methods are not breaking changes.

Required Methods§

Source

fn creation_flags(&mut self, flags: u32) -> &mut Command

Sets the process creation flags to be passed to CreateProcess.

These will always be ORed with CREATE_UNICODE_ENVIRONMENT.

Source

fn raw_arg<S: AsRef<OsStr>>(&mut self, text_to_append_as_is: S) -> &mut Command

Append literal text to the command line without any quoting or escaping.

This is useful for passing arguments to cmd.exe /c, which doesn’t follow CommandLineToArgvW escaping rules.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§