Struct rustdoc::config::RenderOptions[−][src]

pub(crate) struct RenderOptions {
Show 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) 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) generate_search_filter: bool, pub(crate) document_private: bool, pub(crate) document_hidden: bool, pub(crate) generate_redirect_map: bool, pub(crate) unstable_features: UnstableFeatures, pub(crate) emit: Vec<EmitType>,
}
Expand description

Configuration options for the HTML page-creation process.

Fields

output: PathBuf
Expand description

Output directory to generate docs into. Defaults to doc.

external_html: ExternalHtml
Expand description

External files to insert into generated pages.

id_map: IdMap
Expand description

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

playground_url: Option<String>
Expand description

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
Expand description

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

themes: Vec<StylePath>
Expand description

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>
Expand description

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

extern_html_root_urls: BTreeMap<String, String>
Expand description

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

default_settings: FxHashMap<String, String>
Expand description

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

resource_suffix: String
Expand description

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

enable_minification: bool
Expand description

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

enable_index_page: bool
Expand description

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>
Expand description

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>
Expand description

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
Expand description

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

markdown_css: Vec<String>
Expand description

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

markdown_playground_url: Option<String>
Expand description

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.

generate_search_filter: bool
Expand description

If false, the select element to have search filtering by crates on rendered docs won’t be generated.

document_private: bool
Expand description

Document items that have lower than pub visibility.

document_hidden: bool
Expand description

Document items that have doc(hidden).

generate_redirect_map: bool
Expand description

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

unstable_features: UnstableFeaturesemit: Vec<EmitType>

Implementations

impl RenderOptions[src]

pub(crate) fn should_emit_crate(&self) -> bool[src]

Trait Implementations

impl Clone for RenderOptions[src]

fn clone(&self) -> RenderOptions[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for RenderOptions[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for RenderOptions

impl Send for RenderOptions

impl Sync for RenderOptions

impl Unpin for RenderOptions

impl UnwindSafe for RenderOptions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> WithConstness for T[src]

fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]

fn with_const(self) -> ConstnessAnd<Self>[src]

fn without_const(self) -> ConstnessAnd<Self>[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]