[][src]Enum rustyline::Cmd

#[non_exhaustive]pub enum Cmd {
    Abort,
    AcceptLine,
    BeginningOfHistory,
    CapitalizeWord,
    ClearScreen,
    Complete,
    CompleteBackward,
    CompleteHint,
    DowncaseWord,
    EndOfFile,
    EndOfHistory,
    ForwardSearchHistory,
    HistorySearchBackward,
    HistorySearchForward,
    Insert(RepeatCountString),
    Interrupt,
    Kill(Movement),
    Move(Movement),
    NextHistory,
    Noop,
    Overwrite(char),
    PreviousHistory,
    QuotedInsert,
    ReplaceChar(RepeatCountchar),
    Replace(MovementOption<String>),
    ReverseSearchHistory,
    SelfInsert(RepeatCountchar),
    Suspend,
    TransposeChars,
    TransposeWords(RepeatCount),
    Undo(RepeatCount),
    Unknown,
    UpcaseWord,
    ViYankTo(Movement),
    Yank(RepeatCountAnchor),
    YankPop,
    LineUpOrPreviousHistory(RepeatCount),
    LineDownOrNextHistory(RepeatCount),
    AcceptOrInsertLine,
}

Commands

Variants (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

BeginningOfHistory

beginning-of-history

CapitalizeWord

capitalize-word

ClearScreen

clear-screen

Complete

complete

CompleteBackward

complete-backward

CompleteHint

complete-hint

DowncaseWord

downcase-word

EndOfFile

vi-eof-maybe

EndOfHistory

end-of-history

ForwardSearchHistory

forward-search-history

HistorySearchBackward

history-search-backward

HistorySearchForward

history-search-forward

Insert text

Interrupt

Interrupt signal (Ctrl-C)

Kill(Movement)

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

Move(Movement)

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

NextHistory

next-history

Noop

No action

Overwrite(char)

vi-replace

PreviousHistory

previous-history

QuotedInsert

quoted-insert

ReplaceChar(RepeatCountchar)

vi-change-char

Replace(MovementOption<String>)

vi-change-to, vi-substitute

ReverseSearchHistory

reverse-search-history

SelfInsert(RepeatCountchar)

self-insert

Suspend

Suspend signal (Ctrl-Z on unix platform)

TransposeChars

transpose-chars

TransposeWords(RepeatCount)

transpose-words

undo

Unknown

Unsupported / unexpected

UpcaseWord

upcase-word

ViYankTo(Movement)

vi-yank-to

yank, vi-put

YankPop

yank-pop

LineUpOrPreviousHistory(RepeatCount)

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

LineDownOrNextHistory(RepeatCount)

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

AcceptOrInsertLine

accepts the line when cursor is at the end of the text (non including trailing whitespace), inserts newline character otherwise

Implementations

impl Cmd[src]

pub fn should_reset_kill_ring(&self) -> bool[src]

Tells if current command should reset kill ring.

Trait Implementations

impl Clone for Cmd[src]

impl Debug for Cmd[src]

impl PartialEq<Cmd> for Cmd[src]

impl StructuralPartialEq for Cmd[src]

Auto Trait Implementations

impl RefUnwindSafe for Cmd

impl Send for Cmd

impl Sync for Cmd

impl Unpin for Cmd

impl UnwindSafe for Cmd

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.