commit | 714b322ba434478ab5dcec86a519ffea53cc3cfa | [log] [tgz] |
---|---|---|
author | Andrew Walbran <[email protected]> | Mon Nov 20 15:41:35 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Mon Nov 20 15:41:35 2023 +0000 |
tree | a08b868f77a3c24aeab3777c24186bd6fe990cfc | |
parent | ec0ab808ed2288cb0725b0ca41f2c86814f0a17a [diff] | |
parent | efe366f7f849abeafcb4bc7d5eb935793974f973 [diff] |
Migrate to cargo_embargo. am: efe366f7f8 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2832654 Change-Id: Id0f694486e17d6587d76fe5f8a68c2927793a774 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