Weave documentation
Rust referenceloom-diff

loom-diff · render

Source declarations, signatures and documentation for render.

Source: sigil/weave/tools/loom-diff/src/render.rs. SHA-256: d71bd01c4e179dbaef2fc7aa7cb92d6ee9e82b5a3a51ccded790b1922eacbad9.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

render::UnifiedDiffOptions

Options for [unified_diff_string].

#[derive(Debug, Clone)]
pub struct UnifiedDiffOptions {
/// `a/` prefix used in the `--- a/` header (git convention).

pub a_prefix: String,
/// `b/` prefix used in the `+++ b/` header.

pub b_prefix: String,
/// Whether to colorize with ANSI escape codes (TTY mode).

pub color: bool
}

Source line: 9.

render::unified_diff_string

Render a [FileDiff] as a unified-diff string. Identical layout to git diff so agents and humans both find this reading exactly as they expect. Empty string for unchanged files.

pub fn unified_diff_string(diff: &FileDiff, opts: &UnifiedDiffOptions) -> String;

Source line: 37.

On this page