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

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

Configuration options for rustdoc.

Fields

input: PathBuf

The crate root or Markdown file to load.

crate_name: Option<String>

The name of the crate being documented.

proc_macro_crate: bool

Whether or not this is a proc-macro crate

error_format: ErrorOutputType

How to format errors and warnings.

libs: Vec<SearchPath>

Library search paths to hand to the compiler.

lib_strs: Vec<String>

Library search paths strings to hand to the compiler.

externs: Externs

The list of external crates to link against.

extern_strs: Vec<String>

The list of external crates strings to link against.

cfgs: Vec<String>

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

codegen_options: CodegenOptions

Codegen options to hand to the compiler.

codegen_options_strs: Vec<String>

Codegen options strings to hand to the compiler.

debugging_opts: DebuggingOptions

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

debugging_opts_strs: Vec<String>

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

target: TargetTriple

The target used to compile the crate against.

edition: Edition

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

maybe_sysroot: Option<PathBuf>

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

lint_opts: Vec<(String, Level)>

Lint information passed over the command-line.

describe_lints: bool

Whether to ask rustc to describe the lints it knows. Practically speaking, this will not be used, since we abort if we have no input file, but it's included for completeness.

lint_cap: Option<Level>

What level to cap lints at.

should_test: bool

Whether we should run doctests instead of generating docs.

test_args: Vec<String>

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

persist_doctests: Option<PathBuf>

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

runtool: Option<String>

Runtool to run doctests with

runtool_args: Vec<String>

Arguments to pass to the runtool

enable_per_target_ignores: bool

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

test_builder: Option<PathBuf>

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

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>

Any passes manually selected by the user.

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

display_warnings: bool

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

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

crate_version: Option<String>

Crate version to note on the sidebar of generated docs.

render_options: RenderOptions

Collected options specific to outputting final pages.

output_format: Option<OutputFormat>

Output format rendering (used only for "show-coverage" option for the moment)

Implementations

impl Options[src]

pub 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 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]

impl Debug for Options[src]

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]

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

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

impl<T> WithConstness for T[src]