• Home
Name Date Size #Lines LOC

..--

derive_ref/04-Jul-2025-471386

tutorial_builder/04-Jul-2025-1,149852

tutorial_derive/04-Jul-2025-1,104777

README.mdD04-Jul-2025830 1712

cargo-example-derive.mdD04-Jul-20251 KiB3928

cargo-example-derive.rsD04-Jul-2025458 2117

cargo-example.mdD04-Jul-2025961 3928

cargo-example.rsD04-Jul-2025657 1918

demo.mdD04-Jul-2025444 1813

demo.rsD04-Jul-2025437 2315

escaped-positional-derive.mdD04-Jul-20251.3 KiB6144

escaped-positional-derive.rsD04-Jul-2025684 2617

escaped-positional.mdD04-Jul-20251.2 KiB6144

escaped-positional.rsD04-Jul-20251 KiB3322

find.mdD04-Jul-20251.2 KiB8070

find.rsD04-Jul-20254.1 KiB127113

git-derive.mdD04-Jul-20253.2 KiB173123

git-derive.rsD04-Jul-20254.2 KiB166144

git.mdD04-Jul-20252.8 KiB171122

git.rsD04-Jul-20254.9 KiB139130

multicall-busybox.mdD04-Jul-2025891 4030

multicall-busybox.rsD04-Jul-20251.6 KiB4843

multicall-hostname.mdD04-Jul-2025268 117

multicall-hostname.rsD04-Jul-2025654 1815

pacman.mdD04-Jul-20251.8 KiB8056

pacman.rsD04-Jul-20254.1 KiB111100

repl-derive.rsD04-Jul-20251.7 KiB6859

repl.rsD04-Jul-20252.5 KiB9381

typed-derive.mdD04-Jul-20253.8 KiB13294

typed-derive.rsD04-Jul-20252.9 KiB10382

README.md

1# Examples
2
3We try to focus our documentation on the [four types of
4documentation](https://documentation.divio.com/).  Examples fit into this by
5providing:
6- [Cookbook / How-To Guides](https://docs.rs/clap/latest/clap/_cookbook/index.html)
7- Tutorials ([derive](https://docs.rs/clap/latest/clap/_derive/_tutorial/index.html), [builder](https://docs.rs/clap/latest/clap/_tutorial/index.html))
8
9This directory contains the source for the above.
10
11## Contributing
12
13New examples should fit within the above structure and support their narrative
14- Add the example to [Cargo.toml](../Cargo.toml) for any `required-features`
15- Document how the example works with a `.md` file which will be verified using [trycmd](https://docs.rs/trycmd)
16- Pull the `.rs` and `.md` file into the appropriate module doc comment to be accessible on docs.rs
17