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#![cfg_attr(docsrs, feature(doc_auto_cfg))]
34
35pub use console;
36
37#[cfg(feature = "completion")]
38pub use completion::Completion;
39#[cfg(feature = "editor")]
40pub use edit::Editor;
41pub use error::{Error, Result};
42#[cfg(feature = "history")]
43pub use history::{BasicHistory, History};
44use paging::Paging;
45pub use validate::{InputValidator, PasswordValidator};
46
47#[cfg(feature = "fuzzy-select")]
48pub use prompts::fuzzy_select::FuzzySelect;
49#[cfg(feature = "password")]
50pub use prompts::password::Password;
51pub use prompts::{
52    confirm::Confirm, input::Input, multi_select::MultiSelect, select::Select, sort::Sort,
53};
54
55#[cfg(feature = "completion")]
56mod completion;
57#[cfg(feature = "editor")]
58mod edit;
59mod error;
60#[cfg(feature = "history")]
61mod history;
62mod paging;
63mod prompts;
64pub mod theme;
65mod validate;