commit | 5d5bdb2eb93ef4889acbfa01d551173bc5536617 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue May 21 23:12:50 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue May 21 23:12:50 2024 +0000 |
tree | c9bd56e43ebfc1397609709f1690d1ee829007a7 | |
parent | 1cb0e3eed4fbf19a8ca215bc05294236c77be691 [diff] | |
parent | 8a949575620c727492899ba64b7b3a65b3931c76 [diff] |
Snap for 11869550 from 8a949575620c727492899ba64b7b3a65b3931c76 to 24Q3-release Change-Id: Ib2a84ec1080f31c96d1d464de6293f205178b3fe
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