| 1 | // Copyright ⓒ 2015-2016 Kevin B. Knapp and [`clap-rs` contributors](https://github.com/clap-rs/clap/graphs/contributors). | 
| 2 | // Licensed under the MIT license | 
|---|
| 3 | // (see LICENSE or <http://opensource.org/licenses/MIT>) All files in the project carrying such | 
|---|
| 4 | // notice may not be copied, modified, or distributed except according to those terms. | 
|---|
| 5 |  | 
|---|
| 6 | #![ doc= include_str!( "../README.md")] | 
|---|
| 7 | #![ doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")] | 
|---|
| 8 | #![ cfg_attr(docsrs, feature(doc_auto_cfg))] | 
|---|
| 9 | #![ forbid(unsafe_code)] | 
|---|
| 10 | #![ warn(missing_docs)] | 
|---|
| 11 | #![ warn(clippy::print_stderr)] | 
|---|
| 12 | #![ warn(clippy::print_stdout)] | 
|---|
| 13 |  | 
|---|
| 14 | #[ cfg(not(feature = "std"))] | 
|---|
| 15 | compile_error!( "`std` feature is currently required to build `clap`"); | 
|---|
| 16 |  | 
|---|
| 17 | pub use crate::builder::ArgAction; | 
|---|
| 18 | pub use crate::builder::Command; | 
|---|
| 19 | pub use crate::builder::ValueHint; | 
|---|
| 20 | pub use crate::builder::{Arg, ArgGroup}; | 
|---|
| 21 | pub use crate::parser::ArgMatches; | 
|---|
| 22 | pub use crate::util::color::ColorChoice; | 
|---|
| 23 | pub use crate::util::Id; | 
|---|
| 24 |  | 
|---|
| 25 | /// Command Line Argument Parser Error | 
|---|
| 26 | /// | 
|---|
| 27 | /// See [`Command::error`] to create an error. | 
|---|
| 28 | /// | 
|---|
| 29 | /// [`Command::error`]: crate::Command::error | 
|---|
| 30 | pub type Error = error::Error<error::DefaultFormatter>; | 
|---|
| 31 |  | 
|---|
| 32 | pub use crate::derive::{Args, CommandFactory, FromArgMatches, Parser, Subcommand, ValueEnum}; | 
|---|
| 33 |  | 
|---|
| 34 | #[ macro_use] | 
|---|
| 35 | #[ allow(missing_docs)] | 
|---|
| 36 | mod macros; | 
|---|
| 37 |  | 
|---|
| 38 | mod derive; | 
|---|
| 39 |  | 
|---|
| 40 | pub mod builder; | 
|---|
| 41 | pub mod error; | 
|---|
| 42 | pub mod parser; | 
|---|
| 43 |  | 
|---|
| 44 | mod mkeymap; | 
|---|
| 45 | mod output; | 
|---|
| 46 | mod util; | 
|---|
| 47 |  | 
|---|
| 48 | const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \ | 
|---|
| 49 |                                   report at https://github.com/clap-rs/clap/issues"; | 
|---|
| 50 |  | 
|---|