commit | 53a48259e4ff8f616f08f6226a6abe5bc5e63b3d | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Mar 10 05:15:15 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Mar 10 05:15:15 2023 +0000 |
tree | 7a26fe7060121f06633afbf29cad40dbc58ae5e2 | |
parent | fee30cbcefa95704e5d2fb842597396518a5c025 [diff] | |
parent | a4d6cfa568ba01646ebe88150e39074cca01b989 [diff] |
Snap for 9722771 from a4d6cfa568ba01646ebe88150e39074cca01b989 to udc-d1-release Change-Id: Ice857510a90f9e5b1dc3eed1bce2fd93d507614a
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