pub trait Backend {
fn show_input(&self, input: &Input) -> Result<Option<String>>;
fn show_message(&self, message: &Message) -> Result<()>;
fn show_password(&self, password: &Password) -> Result<Option<String>>;
fn show_question(&self, question: &Question) -> Result<Choice>;
}
Expand description
A dialog backend.
A dialog backend is a program that can be used to display dialog boxes. Use the
default_backend
function to create a new instance of the default backend, or choose a
backend and create an instance manually. To use a backend, pass it to the show_with
method of a dialog box.
Required Methods
sourcefn show_input(&self, input: &Input) -> Result<Option<String>>
fn show_input(&self, input: &Input) -> Result<Option<String>>
Shows the given input dialog and returns the input.
sourcefn show_message(&self, message: &Message) -> Result<()>
fn show_message(&self, message: &Message) -> Result<()>
Shows the given message dialog.
sourcefn show_password(&self, password: &Password) -> Result<Option<String>>
fn show_password(&self, password: &Password) -> Result<Option<String>>
Shows the given password dialog and returns the password.
sourcefn show_question(&self, question: &Question) -> Result<Choice>
fn show_question(&self, question: &Question) -> Result<Choice>
Shows the given question dialog and returns the choice.