Struct rustyline::config::Config

source ·
pub struct Config { /* private fields */ }
Expand description

User preferences

Implementations§

Returns a Config builder.

Tell the maximum length (i.e. number of entries) for the history.

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

By default, they are ignored.

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

By default, they are saved.

Completion behaviour.

By default, CompletionType::Circular.

When listing completion alternatives, only display one screen of possibilities at a time (used for CompletionType::List mode).

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.

Emacs or Vi mode

Tell if lines are automatically added to the history.

By default, they are not.

Bell style: beep, flash or nothing.

Tell if colors should be enabled.

By default, they are except if stdout is not a TTY.

Whether to use stdio or not

By default, stdio is used.

Horizontal space taken by a tab.

By default, 8.

Check if cursor position is at leftmost before displaying prompt.

By default, we don’t check.

Indentation size used by indentation commands

By default, 2.

Bracketed paste on unix platform

By default, it’s enabled.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.