Trait ChildExt

Source
pub trait ChildExt {
    // Required methods
    fn checked_wait_with_output(self) -> Result<Output, Error>;
    fn checked_wait(&mut self) -> Result<(), Error>;
}
Expand description

Extension to std::process::Child adding versions of the wait_with_output/wait functions which also fail/error with a non-success exit status

Required Methods§

Source

fn checked_wait_with_output(self) -> Result<Output, Error>

Behaves like std::process::Child::wait_with_output but also checks the exit status for success. The Output produced in case of a command returning a failing exit status is included into the error.

§Error

if the exit status is not successful or a io::Error was returned from Child::wait_with_output

Source

fn checked_wait(&mut self) -> Result<(), Error>

Behaves like std::process::Child::wait but also checks the exit status for success.

§Error

if the exit status is not successful or a io::Error was returned from Child::checked_wait

Implementations on Foreign Types§

Source§

impl ChildExt for Child

Implementors§