Skip to main content

GitRunner

Trait GitRunner 

Source
pub trait GitRunner: Send + Sync {
    // Required method
    fn run(&self, cwd: &Path, args: &[&str]) -> Result<String, String>;
}
Expand description

Runs git. Behind a trait so the resolver’s cache/checkout logic is testable against a fake, and against a real local repository, with no network.

Required Methods§

Source

fn run(&self, cwd: &Path, args: &[&str]) -> Result<String, String>

Run git <args> in cwd; return stdout on success.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§