Crate rustdoc_json

source ·
Expand description

Utilities for working with rustdoc JSON.

Building

Use rustdoc_json::Builder to build rustdoc JSON. Like this:

let json_path = rustdoc_json::Builder::default()
    .toolchain("nightly".to_owned())
    .manifest_path("Cargo.toml")
    .build()
    .unwrap();

println!("Built and wrote rustdoc JSON to {:?}", &json_path);

A compilable example can be found here

Structs

BuildOptionsDeprecated
replace rustdoc_json::build(BuildOptions::default().option1().option2().build()) with rustdoc_json::Builder::default().option1().option2().build()
Builds rustdoc JSON. There are many build options. Refer to the docs to learn about them all. See top-level docs for an example on how to use this builder.

Enums

Represents all errors that can occur when using Builder::build().

Functions

buildDeprecated
Generate rustdoc JSON for a library crate. Returns the path to the freshly built rustdoc JSON file.