DialogTheme

Struct DialogTheme 

Source
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: Style

The style for default values

§prompt_style: Style

The 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: Style

The style for error message

§hint_style: Style

The style for hints

§values_style: Style

The style for values on prompt success

Trait Implementations§

Source§

impl Default for DialogTheme

Source§

fn default() -> DialogTheme

Returns the “default value” for a type. Read more
Source§

impl Theme for DialogTheme

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_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>

Formats out an error.
Source§

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>

Formats an input prompt after selection.
Source§

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>

Formats a password prompt after selection.
Source§

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>

Formats a select prompt after selection.
Source§

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>

Formats a sort prompt.
Source§

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>

Formats a sort prompt after selection.
Source§

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>

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>

Formats a sort prompt item.
Source§

fn format_fuzzy_select_prompt_item( &self, f: &mut dyn Write, text: &str, active: bool, highlight_matches: bool, matcher: &SkimMatcherV2, search_term: &str, ) -> Result<(), Error>

Formats a fuzzy select prompt item.
Source§

fn format_fuzzy_select_prompt( &self, f: &mut dyn Write, prompt: &str, search_term: &str, bytes_pos: usize, ) -> Result<(), Error>

Formats a fuzzy select prompt.

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,