Enum rustyline::Cmd[][src]

#[non_exhaustive]
pub enum Cmd {
Show 42 variants Abort, AcceptLine, BeginningOfHistory, CapitalizeWord, ClearScreen, Complete, CompleteBackward, CompleteHint, Dedent(Movement), DowncaseWord, EndOfFile, EndOfHistory, ForwardSearchHistory, HistorySearchBackward, HistorySearchForward, Indent(Movement), Insert(RepeatCount, String), Interrupt, Kill(Movement), Move(Movement), NextHistory, Noop, Overwrite(char), PreviousHistory, QuotedInsert, ReplaceChar(RepeatCount, char), Replace(Movement, Option<String>), ReverseSearchHistory, SelfInsert(RepeatCount, char), Suspend, TransposeChars, TransposeWords(RepeatCount), Undo(RepeatCount), Unknown, UpcaseWord, ViYankTo(Movement), Yank(RepeatCount, Anchor), YankPop, LineUpOrPreviousHistory(RepeatCount), LineDownOrNextHistory(RepeatCount), Newline, AcceptOrInsertLine { accept_in_the_middle: bool, },
}
Expand description

Commands

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Abort

abort

AcceptLine

accept-line

See also AcceptOrInsertLine

BeginningOfHistory

beginning-of-history

CapitalizeWord

capitalize-word

ClearScreen

clear-screen

Complete

complete

CompleteBackward

complete-backward

CompleteHint

complete-hint

Dedent

Dedent current line

Tuple Fields of Dedent

0: Movement
DowncaseWord

downcase-word

EndOfFile

vi-eof-maybe

EndOfHistory

end-of-history

ForwardSearchHistory

forward-search-history

HistorySearchBackward

history-search-backward

HistorySearchForward

history-search-forward

Indent

Indent current line

Tuple Fields of Indent

0: Movement
Insert

Insert text

Tuple Fields of Insert

0: RepeatCount1: String
Interrupt

Interrupt signal (Ctrl-C)

Kill

backward-delete-char, backward-kill-line, backward-kill-word delete-char, kill-line, kill-word, unix-line-discard, unix-word-rubout, vi-delete, vi-delete-to, vi-rubout

Tuple Fields of Kill

0: Movement
Move

backward-char, backward-word, beginning-of-line, end-of-line, forward-char, forward-word, vi-char-search, vi-end-word, vi-next-word, vi-prev-word

Tuple Fields of Move

0: Movement
NextHistory

next-history

Noop

No action

Overwrite

vi-replace

Tuple Fields of Overwrite

0: char
PreviousHistory

previous-history

QuotedInsert

quoted-insert

ReplaceChar

vi-change-char

Tuple Fields of ReplaceChar

0: RepeatCount1: char
Replace

vi-change-to, vi-substitute

Tuple Fields of Replace

0: Movement1: Option<String>
ReverseSearchHistory

reverse-search-history

SelfInsert

self-insert

Tuple Fields of SelfInsert

0: RepeatCount1: char
Suspend

Suspend signal (Ctrl-Z on unix platform)

TransposeChars

transpose-chars

TransposeWords

transpose-words

Tuple Fields of TransposeWords

0: RepeatCount
Undo

undo

Tuple Fields of Undo

0: RepeatCount
Unknown

Unsupported / unexpected

UpcaseWord

upcase-word

ViYankTo

vi-yank-to

Tuple Fields of ViYankTo

0: Movement
Yank

yank, vi-put

Tuple Fields of Yank

0: RepeatCount1: Anchor
YankPop

yank-pop

LineUpOrPreviousHistory

moves cursor to the line above or switches to prev history entry if the cursor is already on the first line

Tuple Fields of LineUpOrPreviousHistory

0: RepeatCount
LineDownOrNextHistory

moves cursor to the line below or switches to next history entry if the cursor is already on the last line

Tuple Fields of LineDownOrNextHistory

0: RepeatCount
Newline

Inserts a newline

AcceptOrInsertLine

Either accepts or inserts a newline

Always inserts newline if input is non-valid. Can also insert newline if cursor is in the middle of the text

If you support multi-line input:

Fields of AcceptOrInsertLine

accept_in_the_middle: bool

Whether this commands accepts input if the cursor not at the end of the current input

Implementations

Tells if current command should reset kill ring.

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

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.