commit | 05da1839d8fbb3fac86616bf7aca301412fa4171 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:13:37 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:13:37 2024 +0000 |
tree | 070d3ab7f54ff6210972e84cb2f6eed9f04099a9 | |
parent | fe32760b1a3988cbe2c2321d48aeccf45962dc36 [diff] | |
parent | e6bd90215e40a36dadcdba45aae3de865e0c5ac9 [diff] |
Snap for 12282710 from e6bd90215e40a36dadcdba45aae3de865e0c5ac9 to 25D4-release Change-Id: Id20db17bb8f7bbafaacb7fb4bbeba4b3c589d216
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