Debian Codegraph @

third_party/rust/clap/src/_derive/_tutorial/chapter_0.rs

raw
1 //! ## Quick Start
2 //!
3 //! You can create an application declaratively with a `struct` and some
4 //! attributes.
5 //!
6 //! First, ensure `clap` is available with the [`derive` feature flag][crate::_features]:
7 //! ```console
8 //! $ cargo add clap --features derive
9 //! ```
10 //!
11 //! ```rust
12 #![doc = include_str!("../../../examples/tutorial_derive/01_quick.rs")]
13 //! ```
14 //!
15 #![doc = include_str!("../../../examples/tutorial_derive/01_quick.md")]
16 //!
17 //! See also
18 //! - [FAQ: When should I use the builder vs derive APIs?][crate::_faq#when-should-i-use-the-builder-vs-derive-apis]
19 //! - The [cookbook][crate::_cookbook] for more application-focused examples
20
21 #![allow(unused_imports)]
22 use crate::builder::*;
23
24 pub use super::chapter_1 as next;
25 pub use crate::_derive::_tutorial as table_of_contents;