pub struct DiffDocument {
pub schema_version: u32,
pub tool: String,
pub repo: String,
pub base: RefInfo,
pub head: RefInfo,
pub merge_base: String,
pub generated_at: String,
pub commits: Vec<Commit>,
pub files: Vec<FileDiff>,
pub snapshots: Option<RangeSnapshots>,
pub description: Option<NotesFile>,
}Expand description
The immutable build artifact: one rendered diff between two pinned refs.
Fields§
§schema_version: u32Schema generation this document was written with; readers reject
documents newer than they understand (SCHEMA_VERSION).
tool: StringProducing tool identifier ("packdiff"); lets a reader distinguish this
document from look-alike JSON of other origins.
repo: StringRepository directory name — not a path, so documents stay shareable across machines.
base: RefInfoThe base ref, pinned to the SHA it resolved to at build time.
head: RefInfoThe head ref, pinned to the SHA it resolved to at build time.
merge_base: StringThe commit the diff actually starts from: merge-base(base, head) in
the default three-dot mode, or base itself in two-dot mode.
generated_at: StringBuild timestamp, RFC 3339 UTC — supplied by the caller (the model has no clock); the only non-deterministic field in a build.
commits: Vec<Commit>Commits in the diffed range, oldest first.
files: Vec<FileDiff>Per-file changes, in the order git emitted them.
snapshots: Option<RangeSnapshots>File snapshots at every commit boundary, enabling in-page filtering of
the diff to any contiguous commit sub-range. None (and omitted from
JSON) when not collected — on older builds, or ranges of fewer than
two commits, where there is nothing to filter.
description: Option<NotesFile>The PR description lifted out of the diff (the notes-commit
convention: commits authored by the system notes author carry notes
such as PR-DESCRIPTION.md, not code under review). Rendered as its
own commentable panel; its commits and file are excluded from
commits / files. None (and omitted from JSON) when the range has
no notes commits.
Implementations§
Source§impl DiffDocument
impl DiffDocument
Trait Implementations§
Source§impl Clone for DiffDocument
impl Clone for DiffDocument
Source§fn clone(&self) -> DiffDocument
fn clone(&self) -> DiffDocument
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more