pub struct Config { /* private fields */ }
Expand description
User preferences
Implementations§
source§impl Config
impl Config
sourcepub fn max_history_size(&self) -> usize
pub fn max_history_size(&self) -> usize
Tell the maximum length (i.e. number of entries) for the history.
sourcepub fn history_duplicates(&self) -> HistoryDuplicates
pub fn history_duplicates(&self) -> HistoryDuplicates
Tell if lines which match the previous history entry are saved or not in the history list.
By default, they are ignored.
sourcepub fn history_ignore_space(&self) -> bool
pub fn history_ignore_space(&self) -> bool
Tell if lines which begin with a space character are saved or not in the history list.
By default, they are saved.
sourcepub fn completion_type(&self) -> CompletionType
pub fn completion_type(&self) -> CompletionType
Completion behaviour.
By default, CompletionType::Circular
.
sourcepub fn completion_prompt_limit(&self) -> usize
pub fn completion_prompt_limit(&self) -> usize
When listing completion alternatives, only display
one screen of possibilities at a time (used for CompletionType::List
mode).
sourcepub fn keyseq_timeout(&self) -> i32
pub fn keyseq_timeout(&self) -> i32
Duration (milliseconds) Rustyline will wait for a character when
reading an ambiguous key sequence (used for EditMode::Vi
mode on unix
platform).
By default, no timeout (-1) or 500ms if EditMode::Vi
is activated.
sourcepub fn auto_add_history(&self) -> bool
pub fn auto_add_history(&self) -> bool
Tell if lines are automatically added to the history.
By default, they are not.
sourcepub fn bell_style(&self) -> BellStyle
pub fn bell_style(&self) -> BellStyle
Bell style: beep, flash or nothing.
sourcepub fn color_mode(&self) -> ColorMode
pub fn color_mode(&self) -> ColorMode
Tell if colors should be enabled.
By default, they are except if stdout is not a TTY.
sourcepub fn check_cursor_position(&self) -> bool
pub fn check_cursor_position(&self) -> bool
Check if cursor position is at leftmost before displaying prompt.
By default, we don’t check.
sourcepub fn indent_size(&self) -> usize
pub fn indent_size(&self) -> usize
Indentation size used by indentation commands
By default, 2.
sourcepub fn enable_bracketed_paste(&self) -> bool
pub fn enable_bracketed_paste(&self) -> bool
Bracketed paste on unix platform
By default, it’s enabled.
Trait Implementations§
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)