• Home
Name Date Size #Lines LOC

..--

.github/workflows/06-Sep-2024-4843

tests/06-Sep-2024-3835

.cargo_vcs_info.jsonD06-Sep-202494 66

.gitignoreD06-Sep-202419 32

Android.bpD06-Sep-20241.9 KiB5450

CHANGELOG.mdD06-Sep-2024952 4523

Cargo.tomlD06-Sep-20241.1 KiB4136

Cargo.toml.origD06-Sep-2024738 2822

LICENSED06-Sep-202410 KiB7441

LICENSE-APACHED06-Sep-202410 KiB7441

LICENSE-MITD06-Sep-20241.1 KiB2016

METADATAD06-Sep-2024684 2119

MODULE_LICENSE_APACHE2D06-Sep-20240

OWNERSD06-Sep-202463 32

README.mdD06-Sep-20241.3 KiB4429

cargo_embargo.jsonD06-Sep-2024110 98

lib.rsD06-Sep-202425.5 KiB878647

rustfmt.tomlD06-Sep-202429 21

README.md

1# Document your crate's feature flags
2
3[![Crates.io](https://img.shields.io/crates/v/document-features)](https://crates.io/crates/document-features)
4[![Documentation](https://docs.rs/document-features/badge.svg)](https://docs.rs/document-features/)
5
6This crate provides a macro that extracts documentation comments from Cargo.toml
7
8To use this crate, add `#![doc = document_features::document_features!()]` in your crate documentation.
9The `document_features!()` macro reads your `Cargo.toml` file, extracts feature comments and generates
10a markdown string for your documentation.
11
12Use `## ` and `#! ` comments in your Cargo.toml to document features, for example:
13
14```toml
15[dependencies]
16document-features = "0.2"
17## ...
18
19[features]
20## The foo feature enables the `foo` functions
21foo = []
22## The bar feature enables the [`bar`] module
23bar = []
24
25#! ### Experimental features
26#! The following features are experimental
27
28## Activate the fusion reactor
29fusion = []
30```
31
32These comments keep the feature definition and documentation next to each other, and they are then
33rendered into your crate documentation.
34
35Check out the [documentation](https://docs.rs/document-features/) for more details.
36
37## Contributions
38
39Contributions are welcome. We accept pull requests and bug reports.
40
41## License
42
43MIT OR Apache-2.0
44