| commit | 45e4fdc8ba6dafdd844f91060fb45e6b6efe2af2 | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 04:19:34 2023 +0000 |
| committer | Automerger Merge Worker <[email protected]> | Fri Mar 10 04:19:34 2023 +0000 |
| tree | 7a26fe7060121f06633afbf29cad40dbc58ae5e2 | |
| parent | aa3f2ba4e4a0790e4510e2b6820eb41dd293d31e [diff] | |
| parent | baa68bc1591ecea8f93372928742f54df45cdf20 [diff] |
Snap for 9719949 from 34830c0646a9c3c29cc85d1f1ff3f40b40417c2f to udc-release am: baa68bc159 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/21946623 Change-Id: Ifd48d293f100561671dda5b9f398b3863f26020f 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