commit | 55571df661fc69798dd97b1d9359821a380da72b | [log] [tgz] |
---|---|---|
author | Wei Li <[email protected]> | Fri Aug 02 17:13:22 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Aug 02 17:13:22 2024 +0000 |
tree | b138b7ec9805c7f5185cc735e6774e94b1acc1ce | |
parent | 8a949575620c727492899ba64b7b3a65b3931c76 [diff] | |
parent | 498ca05739897a958c2d21c891e8dc65911a9ded [diff] |
Cleanup license metadata in external/rust/crates/document-features. am: 498ca05739 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/3205039 Change-Id: If7a6b602cc84ca3163b28e2dcc69505a3ea7030b Signed-off-by: Automerger Merge Worker <[email protected]>
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