Trait dialoguer::theme::Theme

source ·
pub trait Theme {
Show 17 methods // Provided methods fn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result { ... } fn format_error(&self, f: &mut dyn Write, err: &str) -> Result { ... } fn format_confirm_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<bool>, ) -> Result { ... } fn format_confirm_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selection: Option<bool>, ) -> Result { ... } fn format_input_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<&str>, ) -> Result { ... } fn format_input_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result { ... } fn format_password_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result { ... } fn format_password_prompt_selection( &self, f: &mut dyn Write, prompt: &str, ) -> Result { ... } fn format_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result { ... } fn format_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result { ... } fn format_multi_select_prompt( &self, f: &mut dyn Write, prompt: &str, ) -> Result { ... } fn format_sort_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result { ... } fn format_multi_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result { ... } fn format_sort_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result { ... } fn format_select_prompt_item( &self, f: &mut dyn Write, text: &str, active: bool, ) -> Result { ... } fn format_multi_select_prompt_item( &self, f: &mut dyn Write, text: &str, checked: bool, active: bool, ) -> Result { ... } fn format_sort_prompt_item( &self, f: &mut dyn Write, text: &str, picked: bool, active: bool, ) -> Result { ... }
}
Expand description

Implements a theme for dialoguer.

Provided Methods§

source

fn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result

Formats a prompt.

source

fn format_error(&self, f: &mut dyn Write, err: &str) -> Result

Formats out an error.

source

fn format_confirm_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<bool>, ) -> Result

Formats a confirm prompt.

source

fn format_confirm_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selection: Option<bool>, ) -> Result

Formats a confirm prompt after selection.

source

fn format_input_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<&str>, ) -> Result

Formats an input prompt.

source

fn format_input_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result

Formats an input prompt after selection.

source

fn format_password_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result

Formats a password prompt.

source

fn format_password_prompt_selection( &self, f: &mut dyn Write, prompt: &str, ) -> Result

Formats a password prompt after selection.

source

fn format_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result

Formats a select prompt.

source

fn format_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result

Formats a select prompt after selection.

source

fn format_multi_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result

Formats a multi select prompt.

source

fn format_sort_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result

Formats a sort prompt.

source

fn format_multi_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result

Formats a multi_select prompt after selection.

source

fn format_sort_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result

Formats a sort prompt after selection.

source

fn format_select_prompt_item( &self, f: &mut dyn Write, text: &str, active: bool, ) -> Result

Formats a select prompt item.

source

fn format_multi_select_prompt_item( &self, f: &mut dyn Write, text: &str, checked: bool, active: bool, ) -> Result

Formats a multi select prompt item.

source

fn format_sort_prompt_item( &self, f: &mut dyn Write, text: &str, picked: bool, active: bool, ) -> Result

Formats a sort prompt item.

Implementors§