commit | 9383c2a6e7eae29d7d549d8abd1569e8ef408a07 | [log] [tgz] |
---|---|---|
author | Matthew Maurer <[email protected]> | Tue Mar 07 17:23:45 2023 -0800 |
committer | Matthew Maurer <[email protected]> | Tue Mar 07 17:23:45 2023 -0800 |
tree | 7a26fe7060121f06633afbf29cad40dbc58ae5e2 | |
parent | 86001b3c86e6e6472d9c71756895905b6e91db65 [diff] |
Make document-features available to product and vendor Bug: 270690570 Test: mma in external/rust/crates Change-Id: I852cf4bc18e439283d9d390c1b165fb85a9967e2
This crate provides a macro that extracts documentation comments from Cargo.toml
To use this crate, add #![doc = document_features::document_features!()]
in your crate documentation. The document_features!()
macro reads your Cargo.toml
file, extracts feature comments and generates a markdown string for your documentation.
Use ##
and #!
comments in your Cargo.toml to document features, for example:
[dependencies] document-features = "0.2" ## ... [features] ## The foo feature enables the `foo` functions foo = [] ## The bar feature enables the [`bar`] module bar = [] #! ### Experimental features #! The following features are experimental ## Activate the fusion reactor fusion = []
These comments keep the feature definition and documentation next to each other, and they are then rendered into your crate documentation.
Check out the documentation for more details.
Contributions are welcome. We accept pull requests and bug reports.
MIT OR Apache-2.0