pub trait CommandUtils {
// Required methods
fn exec(&mut self) -> Result<Output>;
fn get_stdout_lossy(&mut self) -> Result<String>;
}
Expand description
Useful extensions to std::process::Command
.
Required Methods§
Sourcefn exec(&mut self) -> Result<Output>
fn exec(&mut self) -> Result<Output>
Returns the command’s output if execution is successful, otherwise, throws an error.
Sourcefn get_stdout_lossy(&mut self) -> Result<String>
fn get_stdout_lossy(&mut self) -> Result<String>
Returns the command’s stdout if execution is successful, otherwise, throws an error.