commit | 555ca75099f33ac1714eff5e314fe7e31bdf1fb0 | [log] [tgz] |
---|---|---|
author | Frederick Mayle <[email protected]> | Thu Oct 27 16:38:41 2022 -0700 |
committer | Frederick Mayle <[email protected]> | Fri Nov 04 13:01:10 2022 -0700 |
tree | 4f29ef0c0ff7d75f6180ff334e5d61e85c80847e | |
parent | fc553d80d237e067ca56ac7d74bd378ccdfa9d89 [diff] |
Initial import of document-features-0.2.6 Bug: 255384162 Test: n/a Change-Id: I69aa5393d62e95248570e11e5cff97acc2616387
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