Runner

Trait Runner 

Source
pub trait Runner {
    // Required method
    fn run<S: AsRef<str>>(
        self,
        cmds: &[S],
        format: ResultFormat,
    ) -> Result<Response, Error>;
}
Expand description

Commands runner. Clients implement this trait.

Required Methods§

Source

fn run<S: AsRef<str>>( self, cmds: &[S], format: ResultFormat, ) -> Result<Response, Error>

Runs commands via eAPI and returns the results.

§Arguments:
  • commands is a list of commands to run (they shouldn’t end with new line).
  • format specifies if the results of the commands is plain text or JSON.

The commands are executed in order and the execution stops at the first command that results in an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Requester> Runner for T