Bug: 257493879

Clone this repo:
  1. cf4af94 Migrate 25 crates to monorepo. am: f0fced39de by James Farrell · 9 weeks ago main master
  2. f0fced3 Migrate 25 crates to monorepo. by James Farrell · 9 weeks ago
  3. fddf273 Update Android.bp by running cargo_embargo am: 9ba99f29c1 by James Farrell · 3 months ago
  4. 9ba99f2 Update Android.bp by running cargo_embargo by James Farrell · 3 months ago
  5. 55571df Cleanup license metadata in external/rust/crates/document-features. am: 498ca05739 by Wei Li · 3 months ago

Document your crate's feature flags

Crates.io Documentation

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

Contributions are welcome. We accept pull requests and bug reports.

License

MIT OR Apache-2.0