#[non_exhaustive]
pub enum EscapeCode<'a> {
Show 49 variants CursorBackward(u32), CursorDown(u32), CursorForward(u32), CursorPos(u32u32), CursorRestore, CursorSave, CursorToApp, CursorUp(u32), EraseDisplay, EraseLine, Escape, HideCursor, ResetAutoRepeat, ResetAutoWrap, ResetInterlacing, ResetMode(u8), SelectGraphicRendition(&'a str), SetAlternateKeypad, SetAutoRepeat, SetAutoWrap, SetCol132, SetCol80, SetCursorKeyToCursor, SetG0AltAndSpecialGraph, SetG0AlternateChar, SetG0SpecialChars, SetG1AltAndSpecialGraph, SetG1AlternateChar, SetG1SpecialChars, SetInterlacing, SetJumpScrolling, SetLineFeedMode, SetMode(u8), SetNewLineMode, SetNormalVideo, SetNumericKeypad, SetOriginAbsolute, SetOriginRelative, SetReverseVideo, SetSingleShift2, SetSingleShift3, SetSmoothScroll, SetTopAndBottom(u32u32), SetUKG0, SetUKG1, SetUSG0, SetUSG1, SetVT52, ShowCursor,
}
Expand description

An ANSI Escape Sequence.

You can find some specification on

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.

CursorBackward(u32)

A move cursor backward.

Moves the cursor n (default 1) cells backwards.

CursorDown(u32)

A cursor down.

Moves the cursor n (default 1) cells down.

CursorForward(u32)

A move cursor forward.

Moves the cursor n (default 1) cells forward.

CursorPos(u32u32)

A cursor position.

The values are 1-based, and default to 1 (top left corner) if omitted.

CursorRestore

A restore of current cursor position/state.

CursorSave

A save of current cursor position/state.

CursorToApp

Set cursor key to application

CursorUp(u32)

A cursor up.

Moves the cursor n (default 1) cells up.

EraseDisplay

Erase in Display.

EraseLine

Erase in Display.

Escape

A ESC sequence.

HideCursor

Hide the cursor.

ResetAutoRepeat

Reset auto repeat.

ResetAutoWrap

Reset auto wrap.

ResetInterlacing

Reset interlacin.

ResetMode(u8)

Erase in Display.

SelectGraphicRendition(&'a str)

Select Graphic Rendition (SGR), sets display attributes.

SetAlternateKeypad

Set alternate keypad.

SetAutoRepeat

Set auto repeat.

SetAutoWrap

Set auto wrap.

SetCol132

Set number of columns to 132

SetCol80

Set number of columns to 80

SetCursorKeyToCursor

Set cursor key to cursor.

SetG0AltAndSpecialGraph

Set G0 alt char ROM and spec. graphics.

SetG0AlternateChar

Set G0 alternate character ROM.

SetG0SpecialChars

Set G0 special chars. & line set.

SetG1AltAndSpecialGraph

Set G1 alt char ROM and spec. graphics.

SetG1AlternateChar

Set G1 alternate character ROM.

SetG1SpecialChars

Set G1 special chars. & line set.

SetInterlacing

Set interlacing.

SetJumpScrolling

Set jump scrolling.

SetLineFeedMode

Set line feed mode.

SetMode(u8)

Erase in Display.

SetNewLineMode

Set new line mode.

SetNormalVideo

Set normal video.

SetNumericKeypad

Set numeric keypad.

SetOriginAbsolute

Set origin absolute.

SetOriginRelative

Set origin relative.

SetReverseVideo

Set reverse video.

SetSingleShift2

Set single shift 2.

SetSingleShift3

Set single shift 3.

SetSmoothScroll

Set smooth scroll.

SetTopAndBottom(u32u32)

Set top and bottom lines of a window.

SetUKG0

Set United Kingdom G0 character set.

SetUKG1

Set United Kingdom G1 character set.

SetUSG0

Set United States G0 character set.

SetUSG1

Set United States G1 character set.

SetVT52

Set VT52.

ShowCursor

Show the cursor.

Implementations

Parse an escape code. returns None if the sequence is not supported or it can’t be parsed.

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
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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
Converts the given value to a String. 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.