RenderOptions in rustdoc::config - Rust (original) (raw)
Struct RenderOptions
pub(crate) struct RenderOptions {Show 32 fields
pub(crate) output: PathBuf,
pub(crate) external_html: ExternalHtml,
pub(crate) id_map: IdMap,
pub(crate) playground_url: Option<String>,
pub(crate) module_sorting: ModuleSorting,
pub(crate) themes: Vec<StylePath>,
pub(crate) extension_css: Option<PathBuf>,
pub(crate) extern_html_root_urls: BTreeMap<String, String>,
pub(crate) extern_html_root_takes_precedence: bool,
pub(crate) default_settings: FxIndexMap<String, String>,
pub(crate) resource_suffix: String,
pub(crate) enable_index_page: bool,
pub(crate) index_page: Option<PathBuf>,
pub(crate) static_root_path: Option<String>,
pub(crate) markdown_no_toc: bool,
pub(crate) markdown_css: Vec<String>,
pub(crate) markdown_playground_url: Option<String>,
pub(crate) document_private: bool,
pub(crate) document_hidden: bool,
pub(crate) generate_redirect_map: bool,
pub(crate) show_type_layout: bool,
pub(crate) unstable_features: UnstableFeatures,
pub(crate) emit: Vec<EmitType>,
pub(crate) generate_link_to_definition: bool,
pub(crate) call_locations: FxIndexMap<DefPathHash, FxIndexMap<PathBuf, CallData>>,
pub(crate) no_emit_shared: bool,
pub(crate) html_no_source: bool,
pub(crate) output_to_stdout: bool,
pub(crate) should_merge: ShouldMerge,
pub(crate) include_parts_dir: Vec<PathToParts>,
pub(crate) parts_out_dir: Option<PathToParts>,
pub(crate) disable_minification: bool,
}
Expand description
Configuration options for the HTML page-creation process.
Output directory to generate docs into. Defaults to doc
.
External files to insert into generated pages.
A pre-populated IdMap
with the default headings and any headings added by Markdown files processed by external_html
.
If present, playground URL to use in the “Run” button added to code samples.
Be aware: This option can come both from the CLI and from crate attributes!
What sorting mode to use for module pages.ModuleSorting::Alphabetical
by default.
List of themes to extend the docs with. Original argument name is included to assist in displaying errors if it fails a theme check.
If present, CSS file that contains rules to add to the default CSS.
A map of crate names to the URL to use instead of querying the crate’s html_root_url
.
Whether to give precedence to html_root_url
or --extern-html-root-url
.
A map of the default settings (values are as for DOM storage API). Keys should lack therustdoc-
prefix.
If present, suffix added to CSS/JavaScript files when referencing them in generated pages.
Whether to create an index page in the root of the output directory. If this is true butenable_index_page
is None, generate a static listing of crates instead.
A file to use as the index page at the root of the output directory. Overridesenable_index_page
to be true if set.
An optional path to use as the location of static files. If not set, uses combinations of../
to reach the documentation root.
Whether to generate a table of contents on the output file when reading a standalone Markdown file.
Additional CSS files to link in pages generated from standalone Markdown files.
If present, playground URL to use in the “Run” button added to code samples generated from standalone Markdown files. If not present, playground_url
is used.
Document items that have lower than pub
visibility.
Document items that have doc(hidden)
.
If true
, generate a JSON file in the crate folder instead of HTML redirection files.
Show the memory layout of types in the docs.
Note: this field is duplicated in Options
because it’s useful to have it in both places.
If true
, HTML source pages will generate links for items to their definition.
Set of function-call locations to include as examples
If true
, Context::init will not emit shared files.
If true
, HTML source code pages won’t be generated.
This field is only used for the JSON output. If it’s set to true, no file will be created and content will be displayed in stdout directly.
Whether we should read or write rendered cross-crate info in the doc root.
Path to crate-info for external crates.
Where to write crate-info
disable minification of CSS/JS
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 552 bytes