pub trait Prompter: Send + Sync {
// Required methods
fn confirm(&self, message: &str, default: bool) -> Result<bool>;
fn input(&self, prompt: &str) -> Result<String>;
fn input_with_default(&self, prompt: &str, default: &str) -> Result<String>;
fn select(&self, prompt: &str, items: &[String]) -> Result<usize>;
fn password(&self, prompt: &str) -> Result<String>;
}Required Methods§
fn confirm(&self, message: &str, default: bool) -> Result<bool>
fn input(&self, prompt: &str) -> Result<String>
fn input_with_default(&self, prompt: &str, default: &str) -> Result<String>
fn select(&self, prompt: &str, items: &[String]) -> Result<usize>
fn password(&self, prompt: &str) -> Result<String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".