pub(crate) struct RenderOptions {Show 33 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,
pub(crate) generate_macro_expansion: bool,
}Expand description
Configuration options for the HTML page-creation process.
Fields§
§output: PathBufOutput directory to generate docs into. Defaults to doc.
external_html: ExternalHtmlExternal files to insert into generated pages.
id_map: IdMapA 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!
module_sorting: ModuleSortingWhat sorting mode to use for module pages.
ModuleSorting::Alphabetical 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: boolWhether to give precedence to html_root_url or --extern-html-root-url.
default_settings: FxIndexMap<String, String>A map of the default settings (values are as for DOM storage API). Keys should lack the
rustdoc- prefix.
resource_suffix: StringIf present, suffix added to CSS/JavaScript files when referencing them in generated pages.
enable_index_page: boolWhether 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: boolWhether 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: boolDocument items that have lower than pub visibility.
Document items that have doc(hidden).
generate_redirect_map: boolIf true, generate a JSON file in the crate folder instead of HTML redirection files.
show_type_layout: boolShow the memory layout of types in the docs.
unstable_features: UnstableFeaturesNote: this field is duplicated in Options because it’s useful to have
it in both places.
emit: Vec<EmitType>§generate_link_to_definition: boolIf true, HTML source pages will generate links for items to their definition.
call_locations: FxIndexMap<DefPathHash, FxIndexMap<PathBuf, CallData>>Set of function-call locations to include as examples
If true, Context::init will not emit shared files.
html_no_source: boolIf true, HTML source code pages won’t be generated.
output_to_stdout: boolThis 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.
should_merge: ShouldMergeWhether we should read or write rendered cross-crate info in the doc root.
include_parts_dir: Vec<PathToParts>Path to crate-info for external crates.
parts_out_dir: Option<PathToParts>Where to write crate-info
disable_minification: booldisable minification of CSS/JS
generate_macro_expansion: boolIf true, HTML source pages will generate the possibility to expand macros.
Implementations§
Source§impl RenderOptions
impl RenderOptions
pub(crate) fn should_emit_crate(&self) -> bool
pub(crate) fn dep_info(&self) -> Option<Option<&OutFileName>>
Trait Implementations§
Source§impl Clone for RenderOptions
impl Clone for RenderOptions
Source§fn clone(&self) -> RenderOptions
fn clone(&self) -> RenderOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RenderOptions
impl RefUnwindSafe for RenderOptions
impl Send for RenderOptions
impl Sync for RenderOptions
impl Unpin for RenderOptions
impl UnwindSafe for RenderOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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: 560 bytes