[−][src]Module rustdoc::html::render
Rustdoc's HTML Rendering module
This modules contains the bulk of the logic necessary for rendering a
rustdoc clean::Crate
instance to a set of static HTML pages. This
rendering process is largely driven by the format!
syntax extension to
perform all I/O into files and streams.
The rendering process is largely driven by the Context
and Cache
structures. The cache is pre-populated by crawling the crate in question,
and then it is shared among the various rendering threads. The cache is meant
to be a fairly large structure not implementing Clone
(because it's shared
among threads). The context, however, should be a lightweight structure. This
is cloned per-thread and contains information about what is currently being
rendered.
In order to speed up rendering (mostly because of markdown rendering), the
rendering process has been parallelized. This parallelization is only
exposed through the crate
method on the context, and then also from the
fact that the shared cache is stored in TLS (and must be accessed as such).
In addition to rendering the crate itself, this module is also responsible for creating the corresponding search index and source file renderings. These threads are not parallelized (they haven't been a bottleneck yet), and both occur before the crate is rendered.
Re-exports
pub use self::ExternalLocation::*; |
Structs
AllTypes | |
Cache |
This cache is used to store information about the |
Context |
Major driving force in all rustdoc rendering. This contains information about where in the tree-like hierarchy rendering is occurring and controls how the current page is being rendered. |
Error | |
Impl |
Metadata about implementations for a type or trait. |
IndexItem |
Struct representing one entry in the JS search index. These are all emitted by hand to a large JS file at the end of cache-creation. |
IndexItemFunctionType |
Full type of functions/methods in the search index. |
Item | |
ItemEntry | |
RenderInfo |
Temporary storage for data obtained during |
Settings | |
SharedContext | |
Sidebar | |
Source |
Wrapper struct to render the source code of a file. This will do things like adding line numbers to the left-hand side. |
SourceCollector |
Helper struct to render all source code to HTML pages |
Type |
A type used for the search index. |
Enums
AssocItemLink | |
AssocItemRender | |
ExternalLocation |
Indicates where an external crate can be found. |
RenderMode |
Constants
ATTRIBUTE_WHITELIST | |
BASIC_KEYWORDS | |
CACHE_KEY | |
CURRENT_LOCATION_KEY |
Functions
Type Definitions
NameDoc |
A pair of name and its optional document. |