Skip to main content

render_api_json

Function render_api_json 

Source
pub fn render_api_json(krate: &IndexedCrate) -> Result<String>
Expand description

Render the deterministic public-API surface JSON for a single crate.

The document intentionally excludes non-public items, unnameable items (impls, imports, associated items), and any information that changes across rustdoc runs without corresponding source changes (spans, IDs, etc.). Callers use this as the check target for --check --strict: if two runs produce different JSON, something in the crate’s public surface actually moved.

Items are sorted lexicographically by path so diffs read cleanly.