pub struct Builder { /* private fields */ }Expand description
Configuration builder
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn max_history_size(self, max_size: usize) -> Result<Builder, ReadlineError>
pub fn max_history_size(self, max_size: usize) -> Result<Builder, ReadlineError>
Set the maximum length for the history.
Sourcepub fn history_ignore_dups(self, yes: bool) -> Result<Builder, ReadlineError>
pub fn history_ignore_dups(self, yes: bool) -> Result<Builder, ReadlineError>
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, yes: bool) -> Builder
pub fn history_ignore_space(self, yes: bool) -> Builder
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, completion_type: CompletionType) -> Builder
pub fn completion_type(self, completion_type: CompletionType) -> Builder
Set completion_type.
Sourcepub fn completion_prompt_limit(self, completion_prompt_limit: usize) -> Builder
pub fn completion_prompt_limit(self, completion_prompt_limit: usize) -> Builder
The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed.
Sourcepub fn completion_show_all_if_ambiguous(
self,
completion_show_all_if_ambiguous: bool,
) -> Builder
pub fn completion_show_all_if_ambiguous( self, completion_show_all_if_ambiguous: bool, ) -> Builder
Choose whether or not to show all alternatives immediately when using list completion
By default, a second tab is needed.
Sourcepub fn keyseq_timeout(self, keyseq_timeout_ms: Option<u16>) -> Builder
pub fn keyseq_timeout(self, keyseq_timeout_ms: Option<u16>) -> Builder
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.
Sourcepub fn auto_add_history(self, yes: bool) -> Builder
pub fn auto_add_history(self, yes: bool) -> Builder
Tell if lines are automatically added to the history.
By default, they are not.
Sourcepub fn bell_style(self, bell_style: BellStyle) -> Builder
pub fn bell_style(self, bell_style: BellStyle) -> Builder
Set bell style: beep, flash or nothing.
Sourcepub fn color_mode(self, color_mode: ColorMode) -> Builder
pub fn color_mode(self, color_mode: ColorMode) -> Builder
Forces colorization on or off.
By default, colorization is on except if stdout is not a TTY.
Sourcepub fn grapheme_cluster_mode(
self,
grapheme_cluster_mode: GraphemeClusterMode,
) -> Builder
pub fn grapheme_cluster_mode( self, grapheme_cluster_mode: GraphemeClusterMode, ) -> Builder
Tell if terminal supports grapheme clustering
Sourcepub fn behavior(self, behavior: Behavior) -> Builder
pub fn behavior(self, behavior: Behavior) -> Builder
Whether to use stdio or not
By default, stdio is used.
Sourcepub fn check_cursor_position(self, yes: bool) -> Builder
pub fn check_cursor_position(self, yes: bool) -> Builder
Check if cursor position is at leftmost before displaying prompt.
By default, we don’t check.
Sourcepub fn indent_size(self, indent_size: u8) -> Builder
pub fn indent_size(self, indent_size: u8) -> Builder
Indentation size
By default, 2
Sourcepub fn bracketed_paste(self, enabled: bool) -> Builder
pub fn bracketed_paste(self, enabled: bool) -> Builder
Enable or disable bracketed paste on unix platform
By default, it’s enabled.
Sourcepub fn enable_signals(self, enable_signals: bool) -> Builder
pub fn enable_signals(self, enable_signals: bool) -> Builder
Enable or disable signals in termios
By default, it’s disabled.
Trait Implementations§
Source§impl Configurer for Builder
impl Configurer for Builder
Source§fn config_mut(&mut self) -> &mut Config
fn config_mut(&mut self) -> &mut Config
Config accessor.Source§fn set_max_history_size(&mut self, max_size: usize) -> Result<(), ReadlineError>
fn set_max_history_size(&mut self, max_size: usize) -> Result<(), ReadlineError>
Source§fn set_history_ignore_dups(&mut self, yes: bool) -> Result<(), ReadlineError>
fn set_history_ignore_dups(&mut self, yes: bool) -> Result<(), ReadlineError>
Source§fn set_history_ignore_space(&mut self, yes: bool)
fn set_history_ignore_space(&mut self, yes: bool)
Source§fn set_completion_type(&mut self, completion_type: CompletionType)
fn set_completion_type(&mut self, completion_type: CompletionType)
completion_type.Source§fn set_completion_show_all_if_ambiguous(
&mut self,
completion_show_all_if_ambiguous: bool,
)
fn set_completion_show_all_if_ambiguous( &mut self, completion_show_all_if_ambiguous: bool, )
Source§fn set_completion_prompt_limit(&mut self, completion_prompt_limit: usize)
fn set_completion_prompt_limit(&mut self, completion_prompt_limit: usize)
Source§fn set_keyseq_timeout(&mut self, keyseq_timeout_ms: Option<u16>)
fn set_keyseq_timeout(&mut self, keyseq_timeout_ms: Option<u16>)
Source§fn set_edit_mode(&mut self, edit_mode: EditMode)
fn set_edit_mode(&mut self, edit_mode: EditMode)
Source§fn set_auto_add_history(&mut self, yes: bool)
fn set_auto_add_history(&mut self, yes: bool)
Source§fn set_bell_style(&mut self, bell_style: BellStyle)
fn set_bell_style(&mut self, bell_style: BellStyle)
Source§fn set_color_mode(&mut self, color_mode: ColorMode)
fn set_color_mode(&mut self, color_mode: ColorMode)
Source§fn set_grapheme_cluster_mode(
&mut self,
grapheme_cluster_mode: GraphemeClusterMode,
)
fn set_grapheme_cluster_mode( &mut self, grapheme_cluster_mode: GraphemeClusterMode, )
Source§fn set_tab_stop(&mut self, tab_stop: u8)
fn set_tab_stop(&mut self, tab_stop: u8)
Source§fn set_check_cursor_position(&mut self, yes: bool)
fn set_check_cursor_position(&mut self, yes: bool)
Source§fn set_indent_size(&mut self, size: u8)
fn set_indent_size(&mut self, size: u8)
Source§fn enable_bracketed_paste(&mut self, enabled: bool)
fn enable_bracketed_paste(&mut self, enabled: bool)
Source§fn enable_synchronized_output(&mut self, enabled: bool)
fn enable_synchronized_output(&mut self, enabled: bool)
Source§fn set_enable_signals(&mut self, enable_signals: bool)
fn set_enable_signals(&mut self, enable_signals: bool)
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> PowerToOwned for T
impl<T> PowerToOwned for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().