Module rustdoc::html::render
[−]
[src]
rustdoc
)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.
Reexports
pub use self::ExternalLocation::*; |
Structs
Cache |
[Unstable] This cache is used to store information about the |
Context |
[Unstable] 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 | [Unstable] |
Impl |
[Unstable] Metadata about implementations for a type. |
Implementor |
[Unstable] Metadata about an implementor of a trait. |
RenderInfo |
[Unstable] Temporary storage for data obtained during |
SharedContext | [Unstable] |
Enums
ExternalLocation |
[Unstable] Indicates where an external crate can be found. |
Statics
CURRENT_LOCATION_KEY | [Unstable] |
Functions
cache | [Unstable] |
derive_id | [Unstable] |
reset_ids |
[Unstable] This method resets the local table of used ID attributes. This is typically used at the beginning of rendering an entire HTML page to reset from the previous state (if any). |
run |
[Unstable] Generates the documentation for |
Type Definitions
NameDoc |
[Unstable] A pair of name and its optional document. |