Auto merge of #126690 - andyolivares:feature/show_window, r=dtolnay · model-checking/verify-rust-std@4552576 (original) (raw)

`@@ -181,6 +181,14 @@ 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 of [STARTUPINFO][1] that is passed to CreateProcess.

``

``

185

`+

/// Allowed values are the ones listed in

`

``

186

`+

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

`

``

187

`+

///

`

``

188

`+

/// [1]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfow

`

``

189

`+

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

`

``

190

`+

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

`

``

191

+

184

192

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

``

185

193

`///

`

186

194

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

`

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

`

370

378

`self

`

371

379

`}

`

372

380

``

``

381

`+

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

`

``

382

`+

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

`

``

383

`+

self

`

``

384

`+

}

`

``

385

+

373

386

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

`

374

387

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

`

375

388

`self

`