commit | 1fc88add1c5d0598d0eacc7c7170dce7e4f4f1bc | [log] [tgz] |
---|---|---|
author | Sam Saccone <[email protected]> | Tue Jul 18 22:13:58 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Jul 18 22:13:58 2023 +0000 |
tree | a913ad7e7099be1d931c2eec8f5b3e8cdedbf3ef | |
parent | a4d6cfa568ba01646ebe88150e39074cca01b989 [diff] | |
parent | 00916f40792f11fea668ec38a8a7a5d864c9769b [diff] |
Move OWNER reference master=>main. am: 0aaf01b334 am: 4175aee582 am: 2c30f06882 am: 00916f4079 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2661246 Change-Id: I4041f9a1f0639a3d4f7817c6e1ca4a4044022c5c 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