Trait CommandExt

Source
pub trait CommandExt {
    // Required methods
    fn output_checked(&mut self) -> Result<Output, CommandError>;
    fn log(&mut self) -> &mut Self;
}
Expand description

Extension trait for utilities on std::process::Command

Required Methods§

Source

fn output_checked(&mut self) -> Result<Output, CommandError>

Same as Command::output() but will treat non-success status of the Command as an error.

Source

fn log(&mut self) -> &mut Self

Print the command to be executed

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CommandExt for Command

Source§

fn output_checked(&mut self) -> Result<Output, CommandError>

Source§

fn log(&mut self) -> &mut Self

Implementors§