Struct rustyline::config::Builder [−][src]
Configuration builder
Implementations
impl Builder
[src]
pub fn new() -> Self
[src]
pub fn max_history_size(self, max_size: usize) -> Self
[src]
Set the maximum length for the history.
pub fn history_ignore_dups(self, yes: bool) -> Self
[src]
Tell if lines which match the previous history entry are saved or not in the history list.
By default, they are ignored.
pub fn history_ignore_space(self, yes: bool) -> Self
[src]
Tell if lines which begin with a space character are saved or not in the history list.
By default, they are saved.
pub fn completion_type(self, completion_type: CompletionType) -> Self
[src]
Set completion_type
.
pub fn completion_prompt_limit(self, completion_prompt_limit: usize) -> Self
[src]
The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed.
pub fn keyseq_timeout(self, keyseq_timeout_ms: i32) -> Self
[src]
Timeout for ambiguous key sequences in milliseconds.
Currently, it is used only to distinguish a single ESC from an ESC
sequence.
After seeing an ESC key, wait at most keyseq_timeout_ms
for another
byte.
pub fn edit_mode(self, edit_mode: EditMode) -> Self
[src]
Choose between Emacs or Vi mode.
pub fn auto_add_history(self, yes: bool) -> Self
[src]
Tell if lines are automatically added to the history.
By default, they are not.
pub fn bell_style(self, bell_style: BellStyle) -> Self
[src]
Set bell style: beep, flash or nothing.
pub fn color_mode(self, color_mode: ColorMode) -> Self
[src]
Forces colorization on or off.
By default, colorization is on except if stdout is not a TTY.
pub fn output_stream(self, stream: OutputStreamType) -> Self
[src]
Whether to use stdout or stderr.
Be default, use stdout
pub fn tab_stop(self, tab_stop: usize) -> Self
[src]
Horizontal space taken by a tab.
By default, 8
pub fn build(self) -> Config
[src]
Trait Implementations
impl Clone for Builder
[src]
impl Configurer for Builder
[src]
fn config_mut(&mut self) -> &mut Config
[src]
fn set_max_history_size(&mut self, max_size: usize)
[src]
fn set_history_ignore_dups(&mut self, yes: bool)
[src]
fn set_history_ignore_space(&mut self, yes: bool)
[src]
fn set_completion_type(&mut self, completion_type: CompletionType)
[src]
fn set_completion_prompt_limit(&mut self, completion_prompt_limit: usize)
[src]
fn set_keyseq_timeout(&mut self, keyseq_timeout_ms: i32)
[src]
fn set_edit_mode(&mut self, edit_mode: EditMode)
[src]
fn set_auto_add_history(&mut self, yes: bool)
[src]
fn set_bell_style(&mut self, bell_style: BellStyle)
[src]
fn set_color_mode(&mut self, color_mode: ColorMode)
[src]
fn set_output_stream(&mut self, stream: OutputStreamType)
[src]
fn set_tab_stop(&mut self, tab_stop: usize)
[src]
impl Debug for Builder
[src]
impl Default for Builder
[src]
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,