ExitStatusExt

Trait ExitStatusExt 

Source
pub trait ExitStatusExt {
    // Required methods
    fn check_status(&mut self) -> Result<()>;
    fn check_status_with_stderr(&mut self, stderr: File) -> Result<()>;
}
Expand description

Helpers intended for std::process::ExitStatus.

Required Methods§

Source

fn check_status(&mut self) -> Result<()>

If the exit status signals it was not successful, return an error. Note that we intentionally don’t include the command string in the output; we leave it to the caller to add that if they want, as it may be verbose.

Source

fn check_status_with_stderr(&mut self, stderr: File) -> Result<()>

If the exit status signals it was not successful, return an error; this also includes the contents of stderr.

Otherwise this is the same as Self::check_status.

Implementations on Foreign Types§

Source§

impl ExitStatusExt for ExitStatus

Source§

fn check_status(&mut self) -> Result<()>

Source§

fn check_status_with_stderr(&mut self, stderr: File) -> Result<()>

Implementors§