commit | f8a929a7a3f705e7e2d6b80ecf88bf6f23356562 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <qwandor@google.com> | Mon Nov 20 16:14:44 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Nov 20 16:14:44 2023 +0000 |
tree | a08b868f77a3c24aeab3777c24186bd6fe990cfc | |
parent | df6ebc77f7753a36ce534aaa5db945f9e073bc38 [diff] | |
parent | e7b40e98b036f071946d428985fbd57026e5fc00 [diff] |
Migrate to cargo_embargo. am: efe366f7f8 am: e7b40e98b0 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2832654 Change-Id: I939fc87bfe789fe9f20af4e11009074f54f38384 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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