Skip to main content

DiffProvider

Trait DiffProvider 

Source
pub trait DiffProvider {
    // Required methods
    fn parse_patch(&self, text: &str) -> Result<DiffParseResult, String>;
    fn load_diff_from_git(
        &self,
        base: &str,
        head: &str,
        repo_root: &Path,
    ) -> Result<String, String>;
}
Expand description

Port for obtaining changed ranges from diff input.

Required Methods§

Source

fn parse_patch(&self, text: &str) -> Result<DiffParseResult, String>

Parse unified diff text and return changed ranges plus metadata.

Source

fn load_diff_from_git( &self, base: &str, head: &str, repo_root: &Path, ) -> Result<String, String>

Load a unified diff between two refs from a repository path.

Implementations on Foreign Types§

Source§

impl DiffProvider for GitDiffProvider

Source§

fn parse_patch(&self, text: &str) -> Result<DiffParseResult, String>

Source§

fn load_diff_from_git( &self, base: &str, head: &str, repo_root: &Path, ) -> Result<String, String>

Implementors§