Trait Run

Source
pub trait Run {
    // Required methods
    fn run(self) -> Result<Success, Failure>;
    fn stream(self) -> Result<Success, Failure>;
}

Required Methods§

Source

fn run(self) -> Result<Success, Failure>

run a command straight from a object

Source

fn stream(self) -> Result<Success, Failure>

stream a command straight from a object

Implementors§

Source§

impl<T> Run for T
where T: IntoIterator, T::Item: ToString,

run - allows you to run a command directly from a type that support conversion to Vec<String>

Works in the same way as the main run function, returning an object

§Examples

use rsgit::Run;
let output = vec!["log", "--shortstat"].run();

stream - allows you to run a command directly from a type that support conversion to Vec<String>

Works in the same way as the main run function, returning an object

§Examples

use rsgit::Run;
let _ = vec!["log", "--shortstat"].stream();