Struct command_group::builder::CommandGroupBuilder
source · 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::AsyncCommandGroup;
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
Auto Trait Implementations§
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