commit | 34830c0646a9c3c29cc85d1f1ff3f40b40417c2f | [log] [tgz] |
---|---|---|
author | Matthew Maurer <[email protected]> | Thu Mar 09 17:05:14 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Mar 09 17:05:14 2023 +0000 |
tree | 7a26fe7060121f06633afbf29cad40dbc58ae5e2 | |
parent | 6d6982abe5e05fbf5a7581ddb020e756c126420f [diff] | |
parent | 4fbaa5d648030e2fb5f32ff67f72a7e8f514108e [diff] |
Make document-features available to product and vendor am: 9383c2a6e7 am: bbdf06e819 am: 4fbaa5d648 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2476171 Change-Id: Id960b42074cffca0257d50d166ac0bf9020a87a5 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