commit | efd00bdab255ef4ea35eb0f6c3a5676eb84ad26f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed May 10 16:17:01 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed May 10 16:17:01 2023 +0000 |
tree | 7a26fe7060121f06633afbf29cad40dbc58ae5e2 | |
parent | d58a0ae97fb8253f01740b512c6d5a6c2e5b21b3 [diff] | |
parent | 167c1787901502ab8b5fe3d4cd1641c0022232b3 [diff] |
Snap for 10103804 from 167c1787901502ab8b5fe3d4cd1641c0022232b3 to mainline-tzdata5-release Change-Id: I9babbe08f977a131fc332df6097e01646a9af897
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