1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum DiffTag {
4 Context,
5 Removed,
6 Added,
7}
8
9#[derive(Debug, Clone, PartialEq)]
11pub struct DiffLine {
12 pub tag: DiffTag,
13 pub content: String,
14}
15
16#[derive(Debug, Clone, PartialEq)]
18pub struct SplitDiffRow {
19 pub left: Option<SplitDiffCell>,
20 pub right: Option<SplitDiffCell>,
21}
22
23#[derive(Debug, Clone, PartialEq)]
25pub struct SplitDiffCell {
26 pub tag: DiffTag,
27 pub content: String,
28 pub line_number: Option<usize>,
29}
30
31#[derive(Debug, Clone, PartialEq)]
33pub struct DiffPreview {
34 pub lines: Vec<DiffLine>,
36 pub rows: Vec<SplitDiffRow>,
38 pub lang_hint: String,
39 pub start_line: Option<usize>,
41}