pub fn diff(
previous: Option<&Snapshot>,
current: &Snapshot,
) -> Result<DiffResult, Error>Expand description
Compare current against previous (or a cold start if previous is None).
Both snapshots are validated first — a diff hashes both sides, and an implementation MUST NOT hash an ill-formed snapshot (SPEC §9) — so an ill-formed input yields an error, never a result.
Output order is deterministic: every current node in its original order,
then any Removed nodes in previous order.