pub trait CommandAnyhow {
    // Required methods
    fn spawn_anyhow(&mut self) -> Result<Child>;
    fn output_anyhow(&mut self) -> Result<Output>;
    fn status_anyhow(&mut self) -> Result<ExitStatus>;
    fn anyhow_context(&self) -> String;
}
Expand description

Extend std::process::Command with anyhow methods

Required Methods§

source

fn spawn_anyhow(&mut self) -> Result<Child>

Wrap Command::spawn, providing the command as error context

source

fn output_anyhow(&mut self) -> Result<Output>

Wrap Command::output, providing the command as error context

source

fn status_anyhow(&mut self) -> Result<ExitStatus>

Wrap Command::status, providing the command as error context

source

fn anyhow_context(&self) -> String

Describe the command for error contexts

Implementations on Foreign Types§

source§

impl CommandAnyhow for Command

Implementors§