Trait rsgit::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();