Skip to main content

CommandExt

Trait CommandExt 

Source
pub trait CommandExt {
    // Required method
    fn run_with_config(
        &mut self,
        config: &Config,
        context: &str,
    ) -> WallSwitchResult<Output>;
}
Expand description

Extension trait for std::process::Command to unify command execution logic.

Required Methods§

Source

fn run_with_config( &mut self, config: &Config, context: &str, ) -> WallSwitchResult<Output>

Executes the command, printing output parameters in verbose mode or on failures.

§Errors

Returns a WallSwitchError if the process fails to execute or exits with a non-zero status.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CommandExt for Command

Source§

fn run_with_config( &mut self, config: &Config, context: &str, ) -> WallSwitchResult<Output>

Implementors§