Struct dialoguer::theme::SimpleTheme

source ·
pub struct SimpleTheme;
Expand description

The default theme.

Trait Implementations§

source§

impl Theme for SimpleTheme

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.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.