Exposing STARTUPINFOW.wShowWindow in CommandExt (show_window function… · model-checking/verify-rust-std@fe62f6f
@@ -181,6 +181,13 @@ pub trait CommandExt: Sealed {
181181 #[stable(feature = "windows_process_extensions", since = "1.16.0")]
182182fn creation_flags(&mut self, flags: u32) -> &mut process::Command;
183183184+/// 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+184191/// Forces all arguments to be wrapped in quote (`"`) characters.
185192 ///
186193 /// This is useful for passing arguments to [MSYS2/Cygwin][1] based
@@ -370,6 +377,11 @@ impl CommandExt for process::Command {
370377self
371378}
372379380+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+373385fn force_quotes(&mut self, enabled: bool) -> &mut process::Command {
374386self.as_inner_mut().force_quotes(enabled);
375387self