pub trait InputProvider: Send + Sync {
// Required methods
fn password(&self, prompt: &str) -> Result<String>;
fn password_with_confirm(&self, prompt: &str) -> Result<String>;
fn confirm(&self, prompt: &str, default: bool) -> Result<bool>;
fn input_text(&self, prompt: &str, default: Option<&str>) -> Result<String>;
fn select(
&self,
prompt: &str,
items: &[String],
default: usize,
) -> Result<usize>;
}Expand description
Abstract input provider for user interaction.
Required Methods§
Sourcefn password_with_confirm(&self, prompt: &str) -> Result<String>
fn password_with_confirm(&self, prompt: &str) -> Result<String>
Read a password with confirmation (no echo, entered twice).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".