Struct rustdoc::html::render::SharedContext [−][src]
pub struct SharedContext { pub src_root: PathBuf, pub layout: Layout, pub include_sources: bool, pub local_sources: FxHashMap<PathBuf, String>, pub passes: FxHashSet<String>, pub issue_tracker_base_url: Option<String>, pub css_file_extension: Option<PathBuf>, pub created_dirs: RefCell<FxHashSet<PathBuf>>, pub sort_modules_alphabetically: bool, pub themes: Vec<PathBuf>, pub resource_suffix: String, }
Fields
src_root: PathBuf
The path to the crate root source minus the file name. Used for simplifying paths to the highlighted source code files.
layout: Layout
This describes the layout of each page, and is not modified after creation of the context (contains info like the favicon and added html).
include_sources: bool
This flag indicates whether [src]
links should be generated or not. If
the source files are present in the html rendering, then this will be
true
.
local_sources: FxHashMap<PathBuf, String>
The local file sources we've emitted and their respective url-paths.
passes: FxHashSet<String>
All the passes that were run on this crate.
issue_tracker_base_url: Option<String>
The base-URL of the issue tracker for when an item has been tagged with an issue number.
css_file_extension: Option<PathBuf>
The given user css file which allow to customize the generated documentation theme.
created_dirs: RefCell<FxHashSet<PathBuf>>
The directories that have already been created in this doc run. Used to reduce the number
of spurious create_dir_all
calls.
sort_modules_alphabetically: bool
This flag indicates whether listings of modules (in the side bar and documentation itself) should be ordered alphabetically or in order of appearance (in the source code).
themes: Vec<PathBuf>
Additional themes to be added to the generated docs.
resource_suffix: String
Suffix to be added on resource files (if suffix is "-v2" then "light.css" becomes "light-v2.css").
Methods
impl SharedContext
[src]
impl SharedContext
fn ensure_dir(&self, dst: &Path) -> Result<()>
[src]
fn ensure_dir(&self, dst: &Path) -> Result<()>
impl SharedContext
[src]
impl SharedContext
pub fn was_collapsed(&self) -> bool
[src]
pub fn was_collapsed(&self) -> bool
Returns whether the collapse-docs
pass was run on this crate.
pub fn maybe_collapsed_doc_value<'a>(
&self,
item: &'a Item
) -> Option<Cow<'a, str>>
[src]
pub fn maybe_collapsed_doc_value<'a>(
&self,
item: &'a Item
) -> Option<Cow<'a, str>>
Based on whether the collapse-docs
pass was run, return either the doc_value
or the
collapsed_doc_value
of the given item.
Auto Trait Implementations
impl Send for SharedContext
impl Send for SharedContext
impl !Sync for SharedContext
impl !Sync for SharedContext