commit | 9ecffb41635b203ab0a5421be052794047654253 | [log] [tgz] |
---|---|---|
author | Xin Li <[email protected]> | Mon Apr 29 11:50:34 2024 -0700 |
committer | Xin Li <[email protected]> | Mon Apr 29 11:50:34 2024 -0700 |
tree | a368009a1a38e5ff9feff8a33f59d8e6d214f194 | |
parent | 0b7f3d065417a86ea97b1d11327dbe94b66cdca6 [diff] | |
parent | ec2e7d7a609d03cd0f56db9fa445c6324736521c [diff] |
Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future Bug: 337098550 Merged-In: Ide6c2d2a689f1a0d271f123c2e66f72c24242225 Change-Id: I89346297bd11dc1669e00b67f624408324542587
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