pub(crate) struct RenderOptions {
Show 27 fields pub(crate) output: PathBuf, pub(crate) external_html: ExternalHtml, pub(crate) id_map: IdMap, pub(crate) playground_url: Option<String>, pub(crate) sort_modules_alphabetically: bool, 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: FxHashMap<String, String>, pub(crate) resource_suffix: String, pub(crate) enable_minification: bool, 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: FxHashMap<DefPathHash, FxHashMap<PathBuf, CallData>>, pub(crate) no_emit_shared: bool,
}
Expand description

Configuration options for the HTML page-creation process.

Fields

output: PathBuf

Output directory to generate docs into. Defaults to doc.

external_html: ExternalHtml

External files to insert into generated pages.

id_map: IdMap

A pre-populated IdMap with the default headings and any headings added by Markdown files processed by external_html.

playground_url: Option<String>

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!

sort_modules_alphabetically: bool

Whether to sort modules alphabetically on a module page instead of using declaration order. true by default.

themes: Vec<StylePath>

List of themes to extend the docs with. Original argument name is included to assist in displaying errors if it fails a theme check.

extension_css: Option<PathBuf>

If present, CSS file that contains rules to add to the default CSS.

extern_html_root_urls: BTreeMap<String, String>

A map of crate names to the URL to use instead of querying the crate’s html_root_url.

extern_html_root_takes_precedence: bool

Whether to give precedence to html_root_url or --exten-html-root-url.

default_settings: FxHashMap<String, String>

A map of the default settings (values are as for DOM storage API). Keys should lack the rustdoc- prefix.

resource_suffix: String

If present, suffix added to CSS/JavaScript files when referencing them in generated pages.

enable_minification: bool

Whether to run the static CSS/JavaScript through a minifier when outputting them. true by default.

enable_index_page: bool

Whether to create an index page in the root of the output directory. If this is true but enable_index_page is None, generate a static listing of crates instead.

index_page: Option<PathBuf>

A file to use as the index page at the root of the output directory. Overrides enable_index_page to be true if set.

static_root_path: Option<String>

An optional path to use as the location of static files. If not set, uses combinations of ../ to reach the documentation root.

markdown_no_toc: bool

Whether to generate a table of contents on the output file when reading a standalone Markdown file.

markdown_css: Vec<String>

Additional CSS files to link in pages generated from standalone Markdown files.

markdown_playground_url: Option<String>

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_private: bool

Document items that have lower than pub visibility.

document_hidden: bool

Document items that have doc(hidden).

generate_redirect_map: bool

If true, generate a JSON file in the crate folder instead of HTML redirection files.

show_type_layout: bool

Show the memory layout of types in the docs.

unstable_features: UnstableFeaturesemit: Vec<EmitType>generate_link_to_definition: bool

If true, HTML source pages will generate links for items to their definition.

call_locations: FxHashMap<DefPathHash, FxHashMap<PathBuf, CallData>>

Set of function-call locations to include as examples

no_emit_shared: bool

If true, Context::init will not emit shared files.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout

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: 448 bytes