Skip to main content

render

Function render 

Source
pub fn render(
    diff: Diff,
    ctx: &CompareContext,
    detail: Detail,
    include: Includes,
    filter: &Filter,
    budget_bytes: usize,
) -> Result<CompareOutput>
Expand description

Renders a Diff into a CompareOutput at the given detail level.

The renderer is “render-then-trim”: it builds the full output, then drops trailing sections (and sets truncated = true) until the serialized YAML fits within budget_bytes. Section ordering is preserved, so sections at the head of the list are kept and the tail is shed first.