Skip to main content

CmdExt

Trait CmdExt 

Source
pub trait CmdExt {
    // Required method
    fn exec(&mut self) -> Result<Output, CmdError>;
}
Expand description

Extension trait for Command to execute and handle errors.

Required Methods§

Source

fn exec(&mut self) -> Result<Output, CmdError>

Run the command; capture stdout & stderr; return Output on success.

§Errors

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl CmdExt for Command

Source§

fn exec(&mut self) -> Result<Output, CmdError>

Implementors§