Exposing STARTUPINFOW.wShowWindow in CommandExt (show_window function… · model-checking/verify-rust-std@fe62f6f (original) (raw)

`@@ -181,6 +181,13 @@ pub trait CommandExt: Sealed {

`

181

181

`#[stable(feature = "windows_process_extensions", since = "1.16.0")]

`

182

182

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

`

183

183

``

``

184

`` +

/// Sets the field [wShowWindow][1] of [STARTUPINFO][2] that is passed to CreateProcess.

``

``

185

`+

///

`

``

186

`+

/// [1]: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow

`

``

187

`+

/// [2]: https://learn.microsoft.com/es-es/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfow

`

``

188

`+

#[unstable(feature = "windows_process_extensions_show_window", issue = "none")]

`

``

189

`+

fn show_window(&mut self, cmd_show: u16) -> &mut process::Command;

`

``

190

+

184

191

`` /// Forces all arguments to be wrapped in quote (") characters.

``

185

192

`///

`

186

193

`/// This is useful for passing arguments to [MSYS2/Cygwin][1] based

`

`@@ -370,6 +377,11 @@ impl CommandExt for process::Command {

`

370

377

`self

`

371

378

`}

`

372

379

``

``

380

`+

fn show_window(&mut self, cmd_show: u16) -> &mut process::Command {

`

``

381

`+

self.as_inner_mut().show_window(Some(cmd_show));

`

``

382

`+

self

`

``

383

`+

}

`

``

384

+

373

385

`fn force_quotes(&mut self, enabled: bool) -> &mut process::Command {

`

374

386

`self.as_inner_mut().force_quotes(enabled);

`

375

387

`self

`