commit | 1331b2f43ddd1a9431ea48bcbc032723e1a3c994 | [log] [tgz] |
---|---|---|
author | Elie Kheirallah <[email protected]> | Tue Nov 08 01:22:50 2022 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Nov 08 01:22:50 2022 +0000 |
tree | 1d7937e9565f45a80718ecea77c54abadcf8b645 | |
parent | a30938f0d1ce7a3753643b4371bf4baeeb00e25b [diff] | |
parent | 59e10c820894c8829be83271c3bd1fffd7ac6fe6 [diff] |
Run cargo2android am: e733e371f7 am: 59e10c8208 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2290803 Change-Id: Id9ef6a4caca07c374aabc5c551b97e404fdf0c75 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