Trait Configurer

trait Configurer

Trait for component that holds a Config.

Required Methods

fn config_mut(self: &mut Self) -> &mut Config

Config accessor.

Provided Methods

fn set_max_history_size(self: &mut Self, max_size: usize) -> Result<()>

Set the maximum length for the history.

fn set_history_ignore_dups(self: &mut Self, yes: bool) -> Result<()>

Tell if lines which match the previous history entry are saved or not in the history list.

By default, they are ignored.

fn set_history_ignore_space(self: &mut Self, yes: bool)

Tell if lines which begin with a space character are saved or not in the history list.

By default, they are saved.

fn set_completion_type(self: &mut Self, completion_type: CompletionType)

Set completion_type.

fn set_completion_show_all_if_ambiguous(self: &mut Self, completion_show_all_if_ambiguous: bool)

Choose whether or not to show all alternatives immediately when using list completion

By default, a second tab is needed.

fn set_completion_prompt_limit(self: &mut Self, completion_prompt_limit: usize)

The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed.

fn set_keyseq_timeout(self: &mut Self, keyseq_timeout_ms: Option<u16>)

Timeout for ambiguous key sequences in milliseconds.

fn set_edit_mode(self: &mut Self, edit_mode: EditMode)

Choose between Emacs or Vi mode.

fn set_auto_add_history(self: &mut Self, yes: bool)

Tell if lines are automatically added to the history.

By default, they are not.

fn set_bell_style(self: &mut Self, bell_style: BellStyle)

Set bell style: beep, flash or nothing.

fn set_color_mode(self: &mut Self, color_mode: ColorMode)

Forces colorization on or off.

By default, colorization is on except if stdout is not a TTY.

fn set_grapheme_cluster_mode(self: &mut Self, grapheme_cluster_mode: GraphemeClusterMode)

Tell if terminal supports grapheme clustering

fn set_tab_stop(self: &mut Self, tab_stop: u8)

Horizontal space taken by a tab.

By default, 8

fn set_check_cursor_position(self: &mut Self, yes: bool)

Check if cursor position is at leftmost before displaying prompt.

By default, we don't check.

fn set_indent_size(self: &mut Self, size: u8)

Indentation size for indent/dedent commands

By default, 2

fn enable_bracketed_paste(self: &mut Self, enabled: bool)

Enable or disable bracketed paste on unix platform

By default, it's enabled.

fn enable_synchronized_output(self: &mut Self, enabled: bool)

Enable or disable synchronized output on unix platform

By default, it's enabled.

fn set_enable_signals(self: &mut Self, enable_signals: bool)

Enable or disable signals in termios

By default, it's disabled.

Implementors