Enum ansitok::EscapeCode
source · [−]#[non_exhaustive]
pub enum EscapeCode<'a> {
Show 49 variants
CursorBackward(u32),
CursorDown(u32),
CursorForward(u32),
CursorPos(u32, u32),
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(u32, u32),
SetUKG0,
SetUKG1,
SetUSG0,
SetUSG1,
SetVT52,
ShowCursor,
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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(u32, u32)
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(u32, u32)
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
sourceimpl EscapeCode<'_>
impl EscapeCode<'_>
sourcepub fn parse(text: &str) -> Option<EscapeCode<'_>>
pub fn parse(text: &str) -> Option<EscapeCode<'_>>
Parse an escape code. returns None if the sequence is not supported or it can’t be parsed.
Trait Implementations
sourceimpl<'a> Clone for EscapeCode<'a>
impl<'a> Clone for EscapeCode<'a>
sourcefn clone(&self) -> EscapeCode<'a>
fn clone(&self) -> EscapeCode<'a>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for EscapeCode<'a>
impl<'a> Debug for EscapeCode<'a>
sourceimpl Display for EscapeCode<'_>
impl Display for EscapeCode<'_>
sourceimpl<'a> Hash for EscapeCode<'a>
impl<'a> Hash for EscapeCode<'a>
sourceimpl<'a> Ord for EscapeCode<'a>
impl<'a> Ord for EscapeCode<'a>
sourcefn cmp(&self, other: &EscapeCode<'a>) -> Ordering
fn cmp(&self, other: &EscapeCode<'a>) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl<'a> PartialEq<EscapeCode<'a>> for EscapeCode<'a>
impl<'a> PartialEq<EscapeCode<'a>> for EscapeCode<'a>
sourcefn eq(&self, other: &EscapeCode<'a>) -> bool
fn eq(&self, other: &EscapeCode<'a>) -> bool
sourceimpl<'a> PartialOrd<EscapeCode<'a>> for EscapeCode<'a>
impl<'a> PartialOrd<EscapeCode<'a>> for EscapeCode<'a>
sourcefn partial_cmp(&self, other: &EscapeCode<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &EscapeCode<'a>) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more