commit | 0b7f3d065417a86ea97b1d11327dbe94b66cdca6 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <[email protected]> | Thu Feb 08 10:47:17 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Feb 08 10:47:17 2024 +0000 |
tree | a368009a1a38e5ff9feff8a33f59d8e6d214f194 | |
parent | e5601e64f912c0e4f150ba07b671543b41338dac [diff] | |
parent | eb005c010f0be584e825993c282bcb08287feb92 [diff] |
Upgrade document-features to 0.2.8 am: eb005c010f Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2955009 Change-Id: Ide6c2d2a689f1a0d271f123c2e66f72c24242225 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