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

pub(crate) struct Options {
Show fields pub(crate) input: PathBuf, pub(crate) crate_name: Option<String>, pub(crate) proc_macro_crate: bool, pub(crate) error_format: ErrorOutputType, pub(crate) libs: Vec<SearchPath>, pub(crate) lib_strs: Vec<String>, pub(crate) externs: Externs, pub(crate) extern_strs: Vec<String>, pub(crate) cfgs: Vec<String>, pub(crate) codegen_options: CodegenOptions, pub(crate) codegen_options_strs: Vec<String>, pub(crate) debugging_opts: DebuggingOptions, pub(crate) debugging_opts_strs: Vec<String>, pub(crate) target: TargetTriple, pub(crate) edition: Edition, pub(crate) maybe_sysroot: Option<PathBuf>, pub(crate) lint_opts: Vec<(String, Level)>, pub(crate) describe_lints: bool, pub(crate) lint_cap: Option<Level>, pub(crate) should_test: bool, pub(crate) test_args: Vec<String>, pub(crate) test_run_directory: Option<PathBuf>, pub(crate) persist_doctests: Option<PathBuf>, pub(crate) runtool: Option<String>, pub(crate) runtool_args: Vec<String>, pub(crate) enable_per_target_ignores: bool, pub(crate) no_run: bool, pub(crate) test_builder: Option<PathBuf>, pub(crate) default_passes: DefaultPassOption, pub(crate) manual_passes: Vec<String>, pub(crate) display_warnings: bool, pub(crate) show_coverage: bool, pub(crate) crate_version: Option<String>, pub(crate) render_options: RenderOptions, pub(crate) output_format: OutputFormat, pub(crate) run_check: bool, pub(crate) json_unused_externs: bool,
}
Expand description

Configuration options for rustdoc.

Fields

input: PathBuf
Expand description

The crate root or Markdown file to load.

crate_name: Option<String>
Expand description

The name of the crate being documented.

proc_macro_crate: bool
Expand description

Whether or not this is a proc-macro crate

error_format: ErrorOutputType
Expand description

How to format errors and warnings.

libs: Vec<SearchPath>
Expand description

Library search paths to hand to the compiler.

lib_strs: Vec<String>
Expand description

Library search paths strings to hand to the compiler.

externs: Externs
Expand description

The list of external crates to link against.

extern_strs: Vec<String>
Expand description

The list of external crates strings to link against.

cfgs: Vec<String>
Expand description

List of cfg flags to hand to the compiler. Always includes rustdoc.

codegen_options: CodegenOptions
Expand description

Codegen options to hand to the compiler.

codegen_options_strs: Vec<String>
Expand description

Codegen options strings to hand to the compiler.

debugging_opts: DebuggingOptions
Expand description

Debugging (-Z) options to pass to the compiler.

debugging_opts_strs: Vec<String>
Expand description

Debugging (-Z) options strings to pass to the compiler.

target: TargetTriple
Expand description

The target used to compile the crate against.

edition: Edition
Expand description

Edition used when reading the crate. Defaults to “2015”. Also used by default when compiling doctests from the crate.

maybe_sysroot: Option<PathBuf>
Expand description

The path to the sysroot. Used during the compilation process.

lint_opts: Vec<(String, Level)>
Expand description

Lint information passed over the command-line.

describe_lints: bool
Expand description

Whether to ask rustc to describe the lints it knows.

lint_cap: Option<Level>
Expand description

What level to cap lints at.

should_test: bool
Expand description

Whether we should run doctests instead of generating docs.

test_args: Vec<String>
Expand description

List of arguments to pass to the test harness, if running tests.

test_run_directory: Option<PathBuf>
Expand description

The working directory in which to run tests.

persist_doctests: Option<PathBuf>
Expand description

Optional path to persist the doctest executables to, defaults to a temporary directory if not set.

runtool: Option<String>
Expand description

Runtool to run doctests with

runtool_args: Vec<String>
Expand description

Arguments to pass to the runtool

enable_per_target_ignores: bool
Expand description

Whether to allow ignoring doctests on a per-target basis For example, using ignore-foo to ignore running the doctest on any target that contains “foo” as a substring

no_run: bool
Expand description

Do not run doctests, compile them if should_test is active.

test_builder: Option<PathBuf>
Expand description

The path to a rustc-like binary to build tests with. If not set, we default to loading from $sysroot/bin/rustc.

default_passes: DefaultPassOption
Expand description

The selected default set of passes to use.

Be aware: This option can come both from the CLI and from crate attributes!

manual_passes: Vec<String>
Expand description

Any passes manually selected by the user.

Be aware: This option can come both from the CLI and from crate attributes!

display_warnings: bool
Expand description

Whether to display warnings during doc generation or while gathering doctests. By default, all non-rustdoc-specific lints are allowed when generating docs.

show_coverage: bool
Expand description

Whether to run the calculate-doc-coverage pass, which counts the number of public items with and without documentation.

crate_version: Option<String>
Expand description

Crate version to note on the sidebar of generated docs.

render_options: RenderOptions
Expand description

Collected options specific to outputting final pages.

output_format: OutputFormat
Expand description

The format that we output when rendering.

Currently used only for the --show-coverage option.

run_check: bool
Expand description

If this option is set to true, rustdoc will only run checks and not generate documentation.

json_unused_externs: bool
Expand description

Whether doctests should emit unused externs

Implementations

impl Options[src]

pub(crate) fn from_matches(matches: &Matches) -> Result<Options, i32>[src]

Parses the given command-line for options. If an error message or other early-return has been printed, returns Err with the exit code.

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

Returns true if the file given as self.input is a Markdown file.

Trait Implementations

impl Clone for Options[src]

fn clone(&self) -> Options[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 Options[src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

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]