| commit | 6c3a8925537aa61c1f15728c61cf587c89c24c1a | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Wed Sep 11 23:27:36 2024 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Wed Sep 11 23:27:36 2024 +0000 |
| tree | 070d3ab7f54ff6210972e84cb2f6eed9f04099a9 | |
| parent | 9cd238b2fa10557108f401f5b921207cba44783c [diff] | |
| parent | cf4af946c7cf89f7f3876ba77667e9051dde8fe7 [diff] |
Snap for 12355814 from cf4af946c7cf89f7f3876ba77667e9051dde8fe7 to build-tools-release Change-Id: I8b690d9223e5fc15fa73b0e05f24cb1eb964a16d
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