commit | c1a62228c052b900f6fb48626f65143ff82465c2 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Oct 11 18:15:37 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Oct 11 18:15:37 2023 +0000 |
tree | 3d76baf576da4b2d34352ceb0dfe284da37dd45a | |
parent | 2c30f06882b5a6609d3daa30966b84917d53c8fa [diff] | |
parent | 81035b0423d34abf3465fed5777f5d4291ff5d95 [diff] |
Merge "Update Android.bp to reflect aosp/2763825" into main am: cf13d4fd17 am: 81035b0423 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2776439 Change-Id: I9b6d9bb23ac45a6e25911be86c08e95ca6819931 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