Struct linefeed::prompter::Prompter [] [src]

pub struct Prompter<'a, 'b: 'a, Term: 'b + Terminal> { /* fields omitted */ }

Provides access to the current state of input while a read_line call is in progress.

Holds read and write locks on terminal operations. See Interface for more information about concurrent operations.

Instances of this type cannot be constructed by public methods. Instead, an instance is created internally during a call to read_line.

Methods

impl<'a, 'b: 'a, Term: 'b + Terminal> Prompter<'a, 'b, Term>
[src]

[src]

Returns the current buffer.

[src]

Returns the "backup" buffer.

When the user is currently editing a history entry, the backup buffer contains the original user input.

[src]

Returns the command Category of the most recently executed command.

Some commands may use this to influence behavior of repeated commands.

[src]

Returns the set of characters that indicate a word break.

[src]

Sets the buffer to the given value. The cursor is moved to the end of the buffer.

[src]

Returns the current position of the cursor.

[src]

Sets the cursor to the given position within the buffer.

Panics

If the given position is out of bounds or is not aligned to char boundaries.

[src]

Returns the size of the terminal at the last draw operation.

[src]

Returns whether a numerical argument was explicitly supplied by the user.

[src]

Returns the current input sequence.

Important traits for BindingIter<'a>
[src]

Returns an iterator over bound sequences

Important traits for VariableIter<'a>
[src]

Returns an iterator over variable values.

Important traits for HistoryIter<'a>
[src]

Returns an iterator over history entries

[src]

Returns the index into history currently being edited.

If the user is not editing a line of history, None is returned.

[src]

Returns the current number of history entries.

[src]

Selects the history entry currently being edited by the user.

Setting the entry to None will result in editing the input buffer.

[src]

Returns the current set of completions.

Unless the most recent command executed was one operating on completion sets, the result is None.

[src]

Sets the current set of completions.

This completion set is accessed by commands such as complete and possible-completions.

This set will only remain active until the end of the next non-completion command's execution. Therefore, any Function that uses this method must be of the Complete category.

Moves the cursor to the given position, waits for 500 milliseconds (or until next user input), then restores the original cursor position.

Panics

If the given position is out of bounds or is not aligned to char boundaries.

[src]

Deletes a range of text from the input buffer.

Panics

If the given range is out of bounds or is not aligned to char boundaries.

[src]

Deletes a range from the buffer and adds the removed text to the kill ring.

Panics

If the given range is out of bounds or is not aligned to char boundaries.

[src]

Transposes two regions of the buffer, src and dest. The cursor is placed at the end of the new location of src.

Panics

If src and dest overlap, are out of bounds, or are not aligned to char boundaries.

[src]

Insert text from the front of the kill ring at the current cursor position. The cursor is placed at the end of the new text.

[src]

Rotates the kill ring and replaces yanked text with the new front.

If the previous operation was not yank, this has no effect.

[src]

Insert a given character at the current cursor position n times.

The cursor position remains the same.

[src]

Insert a string at the current cursor position.

The cursor position remains the same.

[src]

Replaces a range in the buffer and redraws.

The cursor is placed at the start of the range.

[src]

Replaces a range in the buffer and redraws.

The cursor is placed at the end of the new string.

Trait Implementations

Auto Trait Implementations

impl<'a, 'b, Term> !Send for Prompter<'a, 'b, Term>

impl<'a, 'b, Term> !Sync for Prompter<'a, 'b, Term>