pub struct CommandGroupBuilder<'a, T> { /* private fields */ }
Expand description
CommandGroupBuilder is a builder for a group of processes.
It is created via the group
method on Command
or
AsyncCommand
.
Implementations§
Source§impl CommandGroupBuilder<'_, Command>
impl CommandGroupBuilder<'_, Command>
Sourcepub fn spawn(&mut self) -> Result<GroupChild>
pub fn spawn(&mut self) -> Result<GroupChild>
Executes the command as a child process group, returning a handle to it.
By default, stdin, stdout and stderr are inherited from the parent.
On Windows, this creates a job object instead of a POSIX process group.
§Examples
Basic usage:
use std::process::Command;
use command_group::CommandGroup;
Command::new("ls")
.group()
.spawn()
.expect("ls command failed to start");
Source§impl CommandGroupBuilder<'_, Command>
impl CommandGroupBuilder<'_, Command>
Sourcepub fn spawn(&mut self) -> Result<AsyncGroupChild>
pub fn spawn(&mut self) -> Result<AsyncGroupChild>
Executes the command as a child process group, returning a handle to it.
By default, stdin, stdout and stderr are inherited from the parent.
On Windows, this creates a job object instead of a POSIX process group.
§Examples
Basic usage:
use tokio::process::Command;
use command_group::CommandGroup;
Command::new("ls")
.group()
.spawn()
.expect("ls command failed to start");
Source§impl<'a, T> CommandGroupBuilder<'a, T>
impl<'a, T> CommandGroupBuilder<'a, T>
Sourcepub fn kill_on_drop(&mut self, kill_on_drop: bool) -> &mut Self
pub fn kill_on_drop(&mut self, kill_on_drop: bool) -> &mut Self
Sourcepub fn creation_flags(&mut self, creation_flags: u32) -> &mut Self
pub fn creation_flags(&mut self, creation_flags: u32) -> &mut Self
Set the creation flags for the process.
Auto Trait Implementations§
impl<'a, T> Freeze for CommandGroupBuilder<'a, T>
impl<'a, T> RefUnwindSafe for CommandGroupBuilder<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CommandGroupBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for CommandGroupBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for CommandGroupBuilder<'a, T>
impl<'a, T> !UnwindSafe for CommandGroupBuilder<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more