Args

Type Alias Args 

Source
pub type Args = GenerateArgs;
Expand description

Backwards-compatible type alias for existing code.

Aliased Type§

pub struct Args {
Show 16 fields pub path: Option<PathBuf>, pub dir: Option<PathBuf>, pub no_mdbook: bool, pub no_search_index: bool, pub primary_crate: Option<String>, pub output: PathBuf, pub format: CliOutputFormat, pub exclude_private: bool, pub include_blanket_impls: bool, pub toc_threshold: usize, pub no_quick_reference: bool, pub no_group_impls: bool, pub hide_trivial_derives: bool, pub no_method_anchors: bool, pub source_locations: bool, pub full_method_docs: bool,
}

Fields§

§path: Option<PathBuf>

Path to a local rustdoc JSON file.

Generate this file with: cargo doc --output-format json The JSON file will be in target/doc/{crate_name}.json

Mutually exclusive with --dir.

§dir: Option<PathBuf>

Directory containing multiple rustdoc JSON files.

Use this for multi-crate documentation generation. The tool will scan the directory for all *.json files (rustdoc format) and generate documentation for each crate with cross-crate linking.

Generate JSON files with: RUSTDOCFLAGS='-Z unstable-options --output-format json' cargo +nightly doc

Mutually exclusive with --path.

§no_mdbook: bool

Skip generating mdBook SUMMARY.md file.

Only valid with --dir for multi-crate documentation. By default, a SUMMARY.md file is created in the output directory that can be used as the entry point for an mdBook documentation site.

§no_search_index: bool

Skip generating search_index.json file.

Only valid with --dir for multi-crate documentation. By default, a search_index.json file is created containing all documented items, which can be used with client-side search libraries like Fuse.js, Lunr.js, or FlexSearch.

§primary_crate: Option<String>

Primary crate name for preferential link resolution.

When specified with --dir, links to items in this crate take precedence over items with the same name in dependencies. This helps resolve ambiguous links like exit to the intended crate rather than std::process::exit.

§output: PathBuf

Output directory for generated markdown files.

The directory will be created if it doesn’t exist. Defaults to generated_docs/ in the current directory.

§format: CliOutputFormat

Output format (flat or nested).

  • flat: All files in one directory
  • nested: Directory hierarchy mirroring modules (default)
§exclude_private: bool

Exclude private (non-public) items from the output.

By default, all items are documented including pub(crate), pub(super), and private items. Enable this to only include public items.

§include_blanket_impls: bool

Include blanket trait implementations in the output.

By default, blanket impls like From, Into, TryFrom, TryInto, Any, Borrow, BorrowMut, and ToOwned are filtered out to reduce noise. Enable this to include them in the documentation.

§toc_threshold: usize

Minimum number of items before generating a table of contents.

Modules with fewer items than this threshold won’t have a TOC. Default: 10

§no_quick_reference: bool

Disable quick reference tables at the top of modules.

§no_group_impls: bool

Disable grouping impl blocks by category (Derive, Conversion, etc.).

§hide_trivial_derives: bool

Hide trivial derive implementations (Clone, Copy, Debug, etc.).

§no_method_anchors: bool

Disable method-level anchors for deep linking.

§source_locations: bool

Include source file locations for items.

§full_method_docs: bool

Include full method documentation instead of first-line summaries.

By default, only the first paragraph of method docs is shown in impl blocks. Enable this to include the complete documentation for each method.