Module diff_line

Module diff_line 

Source
Expand description

Diff line representation.

Represents a single line in a diff output, including its kind, content, and line numbers from both the old and new versions.

§Structure

  • DiffLine - The diff line struct
  • constructors - Constructor functions (new, context, added, removed)
  • methods - Instance methods for accessing line properties

§Example

use ratatui_toolkit::code_diff::{DiffLine, DiffLineKind};

// Create a removed line
let line = DiffLine::removed("old content", 5);

// Create an added line
let line = DiffLine::added("new content", 5);

// Create a context line (unchanged)
let line = DiffLine::context("unchanged", 5, 5);

Modules§

constructors
Constructor functions for DiffLine.
methods
Instance methods for DiffLine.

Structs§

DiffLine
Represents a single line in a diff output.