#[derive(Debug, Clone, PartialEq, Eq)]
pub enum DiffLineKind {
Added,
Removed,
Context,
HunkHeader,
Meta,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DiffLine {
pub kind: DiffLineKind,
pub old_line: Option<u32>,
pub new_line: Option<u32>,
pub raw: String,
pub code: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DiffHunk {
pub old_start: u32,
pub old_count: u32,
pub new_start: u32,
pub new_count: u32,
pub header: String,
pub lines: Vec<DiffLine>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DiffFile {
pub path: String,
pub header_lines: Vec<String>,
pub hunks: Vec<DiffHunk>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DiffDocument {
pub files: Vec<DiffFile>,
}