Trait rustyline::config::Configurer
source · pub trait Configurer {
Show 16 methods
// Required method
fn config_mut(&mut self) -> &mut Config;
// Provided methods
fn set_max_history_size(&mut self, max_size: usize) { ... }
fn set_history_ignore_dups(&mut self, yes: bool) { ... }
fn set_history_ignore_space(&mut self, yes: bool) { ... }
fn set_completion_type(&mut self, completion_type: CompletionType) { ... }
fn set_completion_prompt_limit(&mut self, completion_prompt_limit: usize) { ... }
fn set_keyseq_timeout(&mut self, keyseq_timeout_ms: i32) { ... }
fn set_edit_mode(&mut self, edit_mode: EditMode) { ... }
fn set_auto_add_history(&mut self, yes: bool) { ... }
fn set_bell_style(&mut self, bell_style: BellStyle) { ... }
fn set_color_mode(&mut self, color_mode: ColorMode) { ... }
fn set_behavior(&mut self, behavior: Behavior) { ... }
fn set_tab_stop(&mut self, tab_stop: usize) { ... }
fn set_check_cursor_position(&mut self, yes: bool) { ... }
fn set_indent_size(&mut self, size: usize) { ... }
fn enable_bracketed_paste(&mut self, enabled: bool) { ... }
}
Expand description
Trait for component that holds a Config
.
Required Methods§
sourcefn config_mut(&mut self) -> &mut Config
fn config_mut(&mut self) -> &mut Config
Config
accessor.
Provided Methods§
sourcefn set_max_history_size(&mut self, max_size: usize)
fn set_max_history_size(&mut self, max_size: usize)
Set the maximum length for the history.
sourcefn set_history_ignore_dups(&mut self, yes: bool)
fn set_history_ignore_dups(&mut self, yes: bool)
Tell if lines which match the previous history entry are saved or not in the history list.
By default, they are ignored.
sourcefn set_history_ignore_space(&mut self, yes: bool)
fn set_history_ignore_space(&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.
sourcefn set_completion_type(&mut self, completion_type: CompletionType)
fn set_completion_type(&mut self, completion_type: CompletionType)
Set completion_type
.
sourcefn set_completion_prompt_limit(&mut self, completion_prompt_limit: usize)
fn set_completion_prompt_limit(&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.
sourcefn set_keyseq_timeout(&mut self, keyseq_timeout_ms: i32)
fn set_keyseq_timeout(&mut self, keyseq_timeout_ms: i32)
Timeout for ambiguous key sequences in milliseconds.
sourcefn set_edit_mode(&mut self, edit_mode: EditMode)
fn set_edit_mode(&mut self, edit_mode: EditMode)
Choose between Emacs or Vi mode.
sourcefn set_auto_add_history(&mut self, yes: bool)
fn set_auto_add_history(&mut self, yes: bool)
Tell if lines are automatically added to the history.
By default, they are not.
sourcefn set_bell_style(&mut self, bell_style: BellStyle)
fn set_bell_style(&mut self, bell_style: BellStyle)
Set bell style: beep, flash or nothing.
sourcefn set_color_mode(&mut self, color_mode: ColorMode)
fn set_color_mode(&mut self, color_mode: ColorMode)
Forces colorization on or off.
By default, colorization is on except if stdout is not a TTY.
sourcefn set_behavior(&mut self, behavior: Behavior)
fn set_behavior(&mut self, behavior: Behavior)
Whether to use stdio or not
By default, stdio is used.
sourcefn set_tab_stop(&mut self, tab_stop: usize)
fn set_tab_stop(&mut self, tab_stop: usize)
Horizontal space taken by a tab.
By default, 8
sourcefn set_check_cursor_position(&mut self, yes: bool)
fn set_check_cursor_position(&mut self, yes: bool)
Check if cursor position is at leftmost before displaying prompt.
By default, we don’t check.
sourcefn set_indent_size(&mut self, size: usize)
fn set_indent_size(&mut self, size: usize)
Indentation size for indent/dedent commands
By default, 2
sourcefn enable_bracketed_paste(&mut self, enabled: bool)
fn enable_bracketed_paste(&mut self, enabled: bool)
Enable or disable bracketed paste on unix platform
By default, it’s enabled.