1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")]
#![warn(
missing_docs,
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
unused_allocation,
trivial_numeric_casts,
clippy::single_char_pattern
)]
#![forbid(unsafe_code)]
#![allow(clippy::write_with_newline)]
#![allow(clippy::let_and_return)]
#![allow(clippy::single_component_path_imports)]
#![allow(clippy::branches_sharing_code)]
#![allow(clippy::if_same_then_else)]
#![allow(clippy::collapsible_else_if)]
#[cfg(not(feature = "std"))]
compile_error!("`std` feature is currently required to build `clap`");
pub use crate::builder::ArgAction;
pub use crate::builder::Command;
pub use crate::builder::ValueHint;
pub use crate::builder::{Arg, ArgGroup};
pub use crate::parser::ArgMatches;
pub use crate::util::color::ColorChoice;
pub use crate::util::Id;
pub type Error = crate::error::Error<crate::error::DefaultFormatter>;
pub use crate::derive::{Args, CommandFactory, FromArgMatches, Parser, Subcommand, ValueEnum};
#[doc(hidden)]
pub mod __macro_refs {
#[cfg(feature = "cargo")]
#[doc(hidden)]
pub use once_cell;
}
#[macro_use]
#[allow(missing_docs)]
mod macros;
mod derive;
pub mod builder;
pub mod error;
pub mod parser;
mod mkeymap;
mod output;
mod util;
const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \
report at https://github.com/clap-rs/clap/issues";