commit | a7771a983d1185ac5e8fc9382b1ec0c3ba3daf27 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:09:27 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:09:27 2024 +0000 |
tree | 070d3ab7f54ff6210972e84cb2f6eed9f04099a9 | |
parent | 5a943b72201e458ffd17b4d9d2f77b8268e7e749 [diff] | |
parent | f0fced39ded961b944f42090f4c64da60fc729ac [diff] |
Snap for 12284362 from f0fced39ded961b944f42090f4c64da60fc729ac to sdk-release Change-Id: I8d455e94b9815f9cccbbe37f3151e45ea15c42ad
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