Enum ansi_parser::AnsiSequence
source · pub enum AnsiSequence {
Show 49 variants
Escape,
CursorPos(u32, u32),
CursorUp(u32),
CursorDown(u32),
CursorForward(u32),
CursorBackward(u32),
CursorSave,
CursorRestore,
EraseDisplay,
EraseLine,
SetGraphicsMode(Vec<u8, 5>),
SetMode(u8),
ResetMode(u8),
HideCursor,
ShowCursor,
CursorToApp,
SetNewLineMode,
SetCol132,
SetSmoothScroll,
SetReverseVideo,
SetOriginRelative,
SetAutoWrap,
SetAutoRepeat,
SetInterlacing,
SetLineFeedMode,
SetCursorKeyToCursor,
SetVT52,
SetCol80,
SetJumpScrolling,
SetNormalVideo,
SetOriginAbsolute,
ResetAutoWrap,
ResetAutoRepeat,
ResetInterlacing,
SetAlternateKeypad,
SetNumericKeypad,
SetUKG0,
SetUKG1,
SetUSG0,
SetUSG1,
SetG0SpecialChars,
SetG1SpecialChars,
SetG0AlternateChar,
SetG1AlternateChar,
SetG0AltAndSpecialGraph,
SetG1AltAndSpecialGraph,
SetSingleShift2,
SetSingleShift3,
SetTopAndBottom(u32, u32),
}
Expand description
This is a library for parsing ANSI escape sequences. Currently all the basic escape sequences are implemented:
- Cursor Position
- Cursor {Up, Down, Forward, Backward}
- Cursor {Save, Restore}
- Erase Display
- Erase Line
- Set Graphics mode
- Set and Reset Text Mode
This is done through a pulldown type parser, where an iterator is exposed. This essentially turns all of the ANSI sequences into enums and splits the string at every location that there was an ANSI Sequence. The following are the implemented ANSI escape sequences. More to be added.
Variants§
Escape
CursorPos(u32, u32)
CursorUp(u32)
CursorDown(u32)
CursorForward(u32)
CursorBackward(u32)
CursorSave
CursorRestore
EraseDisplay
EraseLine
SetGraphicsMode(Vec<u8, 5>)
SetMode(u8)
ResetMode(u8)
HideCursor
ShowCursor
CursorToApp
SetNewLineMode
SetCol132
SetSmoothScroll
SetReverseVideo
SetOriginRelative
SetAutoWrap
SetAutoRepeat
SetInterlacing
SetLineFeedMode
SetCursorKeyToCursor
SetVT52
SetCol80
SetJumpScrolling
SetNormalVideo
SetOriginAbsolute
ResetAutoWrap
ResetAutoRepeat
ResetInterlacing
SetAlternateKeypad
SetNumericKeypad
SetUKG0
SetUKG1
SetUSG0
SetUSG1
SetG0SpecialChars
SetG1SpecialChars
SetG0AlternateChar
SetG1AlternateChar
SetG0AltAndSpecialGraph
SetG1AltAndSpecialGraph
SetSingleShift2
SetSingleShift3
SetTopAndBottom(u32, u32)
Trait Implementations§
source§impl Clone for AnsiSequence
impl Clone for AnsiSequence
source§fn clone(&self) -> AnsiSequence
fn clone(&self) -> AnsiSequence
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnsiSequence
impl Debug for AnsiSequence
source§impl Display for AnsiSequence
impl Display for AnsiSequence
source§impl PartialEq for AnsiSequence
impl PartialEq for AnsiSequence
source§fn eq(&self, other: &AnsiSequence) -> bool
fn eq(&self, other: &AnsiSequence) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AnsiSequence
Auto Trait Implementations§
impl Freeze for AnsiSequence
impl RefUnwindSafe for AnsiSequence
impl Send for AnsiSequence
impl Sync for AnsiSequence
impl Unpin for AnsiSequence
impl UnwindSafe for AnsiSequence
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more