Rustdoc - The Rust documentation generator
Run a series of passes over the document
Arguments:
srv
:astsrv::srv
- The AST service to provide to the passesdoc
:doc::cratedoc
- The document to transformpasses
:[pass]
- The list of passes used to transform the document
Returns doc::cratedoc
Runs rustdoc over the given file
Arguments:
source_file
:str
AST-parsing helpers
Converts the Rust AST to the rustdoc document model
Use the AST service to create a document tree
Arguments:
srv
:astsrv::srv
default_name
:str
Returns doc::cratedoc
Attribute parsing
The attribute parser provides methods for pulling documentation out of an AST's attributes.
Given a vec of attributes, extract the meta_items contained in the doc attribute
Arguments:
attrs
:[ast::attribute]
Returns option<@ast::meta_item>
The document model
Generate markdown from a document tree
The attribute parsing pass
Traverses the document tree, pulling relevant documention out of the corresponding AST nodes. The information gathered here is the basis of the natural-language documentation for a crate.
Pulls type information out of the AST and attaches it to the document
Prunes branches of the document tree that contain no documentation
Provides all access to AST-related, non-sendable info
Rustdoc is intended to be parallel, and the rustc AST is filled with shared boxes. The AST service attempts to provide a single place to query AST-related information, shielding the rest of Rustdoc from its non-sendableness.