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§
sourcefn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
fn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
Formats a prompt.
sourcefn format_error(&self, f: &mut dyn Write, err: &str) -> Result
fn format_error(&self, f: &mut dyn Write, err: &str) -> Result
Formats out an error.
sourcefn format_confirm_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
default: Option<bool>,
) -> Result
fn format_confirm_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<bool>, ) -> Result
Formats a confirm prompt.
sourcefn format_confirm_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
selection: Option<bool>,
) -> Result
fn format_confirm_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selection: Option<bool>, ) -> Result
Formats a confirm prompt after selection.
sourcefn format_input_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
default: Option<&str>,
) -> Result
fn format_input_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<&str>, ) -> Result
Formats an input prompt.
sourcefn format_input_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
sel: &str,
) -> Result
fn format_input_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result
Formats an input prompt after selection.
sourcefn format_password_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
fn format_password_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
Formats a password prompt.
sourcefn format_password_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result
fn format_password_prompt_selection( &self, f: &mut dyn Write, prompt: &str, ) -> Result
Formats a password prompt after selection.
sourcefn format_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
fn format_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
Formats a select prompt.
sourcefn format_select_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
sel: &str,
) -> Result
fn format_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result
Formats a select prompt after selection.
sourcefn format_multi_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
fn format_multi_select_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
Formats a multi select prompt.
sourcefn format_sort_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
fn format_sort_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result
Formats a sort prompt.
sourcefn format_multi_select_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
selections: &[&str],
) -> Result
fn format_multi_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result
Formats a multi_select prompt after selection.
sourcefn format_sort_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
Formats a sort prompt after selection.
sourcefn format_select_prompt_item(
&self,
f: &mut dyn Write,
text: &str,
active: bool,
) -> Result
fn format_select_prompt_item( &self, f: &mut dyn Write, text: &str, active: bool, ) -> Result
Formats a select prompt item.