pub struct DialogTheme {
pub defaults_style: Style,
pub prompt_style: Style,
pub prompt_prefix: StyledObject<String>,
pub prompt_suffix: StyledObject<String>,
pub success_prefix: StyledObject<String>,
pub success_suffix: StyledObject<String>,
pub error_prefix: StyledObject<String>,
pub error_style: Style,
pub hint_style: Style,
pub values_style: Style,
}Fields§
§defaults_style: StyleThe style for default values
prompt_style: StyleThe style for prompt
prompt_prefix: StyledObject<String>Prompt prefix value and style
prompt_suffix: StyledObject<String>Prompt suffix value and style
success_prefix: StyledObject<String>Prompt on success prefix value and style
success_suffix: StyledObject<String>Prompt on success suffix value and style
error_prefix: StyledObject<String>Error prefix value and style
error_style: StyleThe style for error message
hint_style: StyleThe style for hints
values_style: StyleThe style for values on prompt success
Trait Implementations§
Source§impl Default for DialogTheme
impl Default for DialogTheme
Source§fn default() -> DialogTheme
fn default() -> DialogTheme
Returns the “default value” for a type. Read more
Source§impl Theme for DialogTheme
impl Theme for DialogTheme
Source§fn 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.
Source§fn 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.
Source§fn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result<(), Error>
fn format_prompt(&self, f: &mut dyn Write, prompt: &str) -> Result<(), Error>
Formats a prompt.
Source§fn format_error(&self, f: &mut dyn Write, err: &str) -> Result<(), Error>
fn format_error(&self, f: &mut dyn Write, err: &str) -> Result<(), Error>
Formats out an error.
Source§fn format_input_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
default: Option<&str>,
) -> Result<(), Error>
fn format_input_prompt( &self, f: &mut dyn Write, prompt: &str, default: Option<&str>, ) -> Result<(), Error>
Formats an input prompt.
Source§fn format_input_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
sel: &str,
) -> Result<(), Error>
fn format_input_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result<(), Error>
Formats an input prompt after selection.
Source§fn format_password_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result<(), Error>
fn format_password_prompt( &self, f: &mut dyn Write, prompt: &str, ) -> Result<(), Error>
Formats a password prompt.
Source§fn format_password_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result<(), Error>
fn format_password_prompt_selection( &self, f: &mut dyn Write, prompt: &str, ) -> Result<(), Error>
Formats a password prompt after selection.
Source§fn format_select_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result<(), Error>
fn format_select_prompt( &self, f: &mut dyn Write, prompt: &str, ) -> Result<(), Error>
Formats a select prompt.
Source§fn format_select_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
sel: &str,
) -> Result<(), Error>
fn format_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, sel: &str, ) -> Result<(), Error>
Formats a select prompt after selection.
Source§fn format_multi_select_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result<(), Error>
fn format_multi_select_prompt( &self, f: &mut dyn Write, prompt: &str, ) -> Result<(), Error>
Formats a multi select prompt.
Source§fn format_sort_prompt(
&self,
f: &mut dyn Write,
prompt: &str,
) -> Result<(), Error>
fn format_sort_prompt( &self, f: &mut dyn Write, prompt: &str, ) -> Result<(), Error>
Formats a sort prompt.
Source§fn format_multi_select_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
selections: &[&str],
) -> Result<(), Error>
fn format_multi_select_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result<(), Error>
Formats a multi_select prompt after selection.
Source§fn format_sort_prompt_selection(
&self,
f: &mut dyn Write,
prompt: &str,
selections: &[&str],
) -> Result<(), Error>
fn format_sort_prompt_selection( &self, f: &mut dyn Write, prompt: &str, selections: &[&str], ) -> Result<(), Error>
Formats a sort prompt after selection.
Source§fn format_select_prompt_item(
&self,
f: &mut dyn Write,
text: &str,
active: bool,
) -> Result<(), Error>
fn format_select_prompt_item( &self, f: &mut dyn Write, text: &str, active: bool, ) -> Result<(), Error>
Formats a select prompt item.
Source§fn format_multi_select_prompt_item(
&self,
f: &mut dyn Write,
text: &str,
checked: bool,
active: bool,
) -> Result<(), Error>
fn format_multi_select_prompt_item( &self, f: &mut dyn Write, text: &str, checked: bool, active: bool, ) -> Result<(), Error>
Formats a multi select prompt item.
Source§fn format_sort_prompt_item(
&self,
f: &mut dyn Write,
text: &str,
picked: bool,
active: bool,
) -> Result<(), Error>
fn format_sort_prompt_item( &self, f: &mut dyn Write, text: &str, picked: bool, active: bool, ) -> Result<(), Error>
Formats a sort prompt item.
Auto Trait Implementations§
impl Freeze for DialogTheme
impl RefUnwindSafe for DialogTheme
impl Send for DialogTheme
impl Sync for DialogTheme
impl Unpin for DialogTheme
impl UnwindSafe for DialogTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more