Skip to main content

CommandRunner

Trait CommandRunner 

Source
pub trait CommandRunner {
    // Required methods
    fn run_sudo(&self, name: &str, args: &[String]) -> Result<(), CmdError>;
    fn read_stdout(
        &self,
        name: &str,
        args: &[String],
    ) -> Result<String, CmdError>;
}
Expand description

Ported from the two CommandRunner methods truststore actually calls.

Required Methods§

Source

fn run_sudo(&self, name: &str, args: &[String]) -> Result<(), CmdError>

Ported from CommandRunner.RunSudo.

§Errors

Returns CmdError if the command could not be run or exited non-zero.

Source

fn read_stdout(&self, name: &str, args: &[String]) -> Result<String, CmdError>

Ported from CommandRunner.ReadStdout.

§Errors

Returns CmdError if the command could not be run or exited non-zero.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§