pub struct CommandBuilder { /* private fields */ }Expand description
Fluent builder for process commands.
Implementations§
Source§impl CommandBuilder
impl CommandBuilder
Sourcepub async fn status(self, handle: &RuntimeHandle) -> Result<ExitStatus>
pub async fn status(self, handle: &RuntimeHandle) -> Result<ExitStatus>
Runs the built command and returns its exit status.
Sourcepub async fn status_with_options(
self,
handle: &RuntimeHandle,
options: CommandOptions,
) -> Result<ExitStatus>
pub async fn status_with_options( self, handle: &RuntimeHandle, options: CommandOptions, ) -> Result<ExitStatus>
Runs the built command and returns its exit status using options.
Sourcepub async fn output(self, handle: &RuntimeHandle) -> Result<Output>
pub async fn output(self, handle: &RuntimeHandle) -> Result<Output>
Runs the built command and returns captured output.
Sourcepub async fn output_with_options(
self,
handle: &RuntimeHandle,
options: CommandOptions,
) -> Result<Output>
pub async fn output_with_options( self, handle: &RuntimeHandle, options: CommandOptions, ) -> Result<Output>
Runs the built command and returns captured output using options.
Sourcepub async fn spawn(self, handle: &RuntimeHandle) -> Result<ChildHandle>
pub async fn spawn(self, handle: &RuntimeHandle) -> Result<ChildHandle>
Spawns the built command and returns a child handle.
Sourcepub async fn spawn_with_options(
self,
handle: &RuntimeHandle,
options: CommandOptions,
) -> Result<ChildHandle>
pub async fn spawn_with_options( self, handle: &RuntimeHandle, options: CommandOptions, ) -> Result<ChildHandle>
Spawns the built command and returns a child handle using options.
Auto Trait Implementations§
impl Freeze for CommandBuilder
impl !RefUnwindSafe for CommandBuilder
impl Send for CommandBuilder
impl Sync for CommandBuilder
impl Unpin for CommandBuilder
impl UnsafeUnpin for CommandBuilder
impl !UnwindSafe for CommandBuilder
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