Crate forge_doc

Source
Expand description

The module for generating Solidity documentation.

See DocBuilder.

Re-exports§

pub use mdbook;

Modules§

builder 🔒
document 🔒
error
Parser error.
helpers 🔒
parser 🔒
The parser module.
preprocessor 🔒
Module containing documentation preprocessors.
writer 🔒
The module for writing and formatting various parse tree items.

Structs§

BufWriter
The buffered writer. Writes various display items into the internal buffer.
Comment
The natspec documentation comment.
Comments
The collection of natspec Comment items.
CommentsRef
The collection of references to natspec Comment items.
ContractInheritance
The contract inheritance preprocessor.
Deployment
A contract deployment.
Deployments
The deployments preprocessor.
DocBuilder
Build Solidity documentation for a project from natspec comments. The builder parses the source files using Parser, then formats and writes the elements as the output.
Document
The wrapper around the ParseItem containing additional information the original item and extra context for outputting it.
GitSource
The git source preprocessor.
InferInlineHyperlinks
The infer hyperlinks preprocessor tries to map @dev tags to referenced items Traverses the documents and attempts to find referenced items comments for dev comment tags.
Inheritdoc
The inheritdoc preprocessor. Traverses the documents and attempts to find inherited comments for inheritdoc comment tags.
ParseItem
The parsed item.
Parser
The documentation parser. This type implements a [Visitor] trait.
PreprocessorId
The preprocessor id.

Enums§

CommentTag
The natspec comment tag explaining the purpose of the comment. See: https://docs.soliditylang.org/en/v0.8.17/natspec-format.html#tags.
Markdown
The markdown format.
ParseSource
A wrapper type around pt token.
PreprocessorOutput
Preprocessor output. Wraps all existing preprocessor outputs in a single abstraction.

Constants§

CONTRACT_INHERITANCE_ID
ContractInheritance preprocessor id.
DEPLOYMENTS_ID
Deployments preprocessor id.
GIT_SOURCE_ID
GitSource preprocessor id.
INFER_INLINE_HYPERLINKS_ID
InferInlineHyperlinks preprocessor id.
INHERITDOC_ID
Inheritdoc preprocessor ID.

Traits§

AsDoc
A trait for formatting a parse unit as documentation.
Preprocessor
Trait for preprocessing and/or modifying existing documents before writing the to disk.

Type Aliases§

AsDocResult
The result of AsDoc::as_doc.