Skip to main content

GitService

Trait GitService 

Source
pub trait GitService: Send + 'static {
    // Required methods
    fn snapshot(&mut self, root: &Path) -> GitResult<GitRepositorySnapshot>;
    fn diff(
        &mut self,
        root: &Path,
        path: &Path,
        target: GitDiffTarget,
    ) -> GitResult<GitFileDiff>;
    fn branches(&mut self, root: &Path) -> GitResult<Vec<GitBranch>>;
    fn execute(
        &mut self,
        root: &Path,
        operation: &GitOperation,
    ) -> GitResult<String>;
}
Expand description

Blocking Git boundary. Production calls it only from GitWorker (ADR-0010 §1).

Required Methods§

Source

fn snapshot(&mut self, root: &Path) -> GitResult<GitRepositorySnapshot>

Source

fn diff( &mut self, root: &Path, path: &Path, target: GitDiffTarget, ) -> GitResult<GitFileDiff>

Source

fn branches(&mut self, root: &Path) -> GitResult<Vec<GitBranch>>

Source

fn execute( &mut self, root: &Path, operation: &GitOperation, ) -> GitResult<String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§