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
// Copyright 2017 Lyndon Brown
//
// This file is part of the `gong` command-line argument processing library.
//
// Licensed under the MIT license or the Apache license (Version 2.0), at your option. You may not
// copy, modify, or distribute this file except in compliance with said license. You can find copies
// of these licenses either in the LICENSE-APACHE and LICENSE-MIT files, or alternatively at
// <http://opensource.org/licenses/MIT> and <http://www.apache.org/licenses/LICENSE-2.0>
// respectively.

//! A lightweight, flexible and simple-to-use library provided to *assist* in processing command
//! line arguments.
//!
//! Licensed under the MIT license or the Apache license, Version 2.0, at your option.
//!
//! # Documentation
//!
//! Documentation has been split up into chapters:
//!
//! - [Overview](docs/overview/index.html)
//! - [Options support](docs/options/index.html)
//! - [Usage](docs/usage/index.html)

#![doc(html_logo_url = "https://github.com/jnqnfe/gong/raw/master/logo.png",
       html_favicon_url = "https://github.com/jnqnfe/gong/raw/master/favicon.ico")]

pub mod docs;
#[macro_use]
mod macros; //Note: If we use these in the lib (e.g. internal tests) then this mod must come first!
pub mod analysis;
mod engine;
pub mod options;

pub use engine::*;

/* -- Deprecated stuff -- */
/* Note, not possible to use a type for enum aliasing to mark deprecated, have to do without */

// Does marking the `pub use` for re-exporting enums to old location with deprecated work?
#[deprecated(since = "1.1.0", note = "access from the `analysis` mod")]
pub use analysis::{ItemClass, Item, ItemE, ItemW, DataLocation};
#[deprecated(since = "1.1.0", note = "access from the `options` mod")]
pub use options::{OptionsMode};

#[deprecated(since = "1.1.0", note = "now called `analysis::Analysis`")]
pub type Results<'a> = analysis::Analysis<'a>;
#[deprecated(since = "1.1.0", note = "moved to `options::Options`")]
pub type Options<'a> = options::Options<'a>;
#[deprecated(since = "1.1.0", note = "moved to `options::LongOption`")]
pub type LongOption<'a> = options::LongOption<'a>;
#[deprecated(since = "1.1.0", note = "moved to `options::ShortOption`")]
pub type ShortOption = options::ShortOption;