dialoguer/lib.rs
1//! dialoguer is a library for Rust that helps you build useful small
2//! interactive user inputs for the command line. It provides utilities
3//! to render various simple dialogs like confirmation prompts, text
4//! inputs and more.
5//!
6//! Best paired with other libraries in the family:
7//!
8//! * [indicatif](https://docs.rs/indicatif)
9//! * [console](https://docs.rs/console)
10//!
11//! # Crate Contents
12//!
13//! * Confirmation prompts
14//! * Input prompts (regular and password)
15//! * Input validation
16//! * Selections prompts (single and multi)
17//! * Fuzzy select prompt
18//! * Other kind of prompts
19//! * Editor launching
20//!
21//! # Crate Features
22//!
23//! The following crate features are available:
24//! * `editor`: enables bindings to launch editor to edit strings
25//! * `fuzzy-select`: enables fuzzy select prompt
26//! * `history`: enables input prompts to be able to track history of inputs
27//! * `password`: enables password input prompt
28//! * `completion`: enables ability to implement custom tab-completion for input prompts
29//!
30//! By default `editor` and `password` are enabled.
31
32#![deny(clippy::all)]
33
34pub use console;
35
36#[cfg(feature = "completion")]
37pub use completion::Completion;
38#[cfg(feature = "editor")]
39pub use edit::Editor;
40pub use error::{Error, Result};
41#[cfg(feature = "history")]
42pub use history::{BasicHistory, History};
43use paging::Paging;
44pub use validate::{InputValidator, PasswordValidator};
45
46#[cfg(feature = "fuzzy-select")]
47pub use prompts::fuzzy_select::FuzzySelect;
48#[cfg(feature = "password")]
49pub use prompts::password::Password;
50pub use prompts::{
51 confirm::Confirm, input::Input, multi_select::MultiSelect, select::Select, sort::Sort,
52};
53
54#[cfg(feature = "completion")]
55mod completion;
56#[cfg(feature = "editor")]
57mod edit;
58mod error;
59#[cfg(feature = "history")]
60mod history;
61mod paging;
62mod prompts;
63pub mod theme;
64mod validate;