pub enum Ansi {
Show 21 variants
CursorPosition(u64, u64),
CursorStyle(CursorStyle),
CursorVisibility(CursorVisibility),
CursorUp(u64),
CursorDown(u64),
CursorLeft(u64),
CursorRight(u64),
CursorNextLine(u64),
CursorPreviousLine(u64),
CursorHorizontalAbsolute(u64),
SaveCursorPosition,
RestoreCursorPosition,
EraseInDisplay(DisplayEraseMode),
EraseInLine(LineEraseMode),
ScrollUp(u64),
ScrollDown(u64),
TerminalSize(u64, u64),
TerminalTitle(String),
TerminalForegroundColour(Colour),
TerminalBackgroundColour(Colour),
Sgr(Vec<SgrParameter>),
}
Expand description
ANSI escape sequences. Can be directly formatted into strings.
Variants§
CursorPosition(u64, u64)
Set the (x, y) cursor position.
CursorStyle(CursorStyle)
Set the cursor style.
CursorVisibility(CursorVisibility)
Set the cursor visibility.
CursorUp(u64)
Move the cursor up.
CursorDown(u64)
Move the cursor down.
CursorLeft(u64)
Move the cursor left.
CursorRight(u64)
Move the cursor right.
CursorNextLine(u64)
Move the cursor to the start of line count
steps down.
CursorPreviousLine(u64)
Move the cursor to the start of line count
steps up.
CursorHorizontalAbsolute(u64)
Move the cursor to the column x
.
SaveCursorPosition
Save the current position of the cursor.
RestoreCursorPosition
Restore the position of the cursor.
EraseInDisplay(DisplayEraseMode)
Erase part of the current display.
EraseInLine(LineEraseMode)
Erase part of the current line.
ScrollUp(u64)
Scroll the display up.
ScrollDown(u64)
Scroll the display down.
TerminalSize(u64, u64)
Set the terminal size. This is not supported on Windows.
TerminalTitle(String)
Set the terminal title. This is not supported on Windows.
TerminalForegroundColour(Colour)
Set the terminal foreground colour. This is not supported on Windows.
TerminalBackgroundColour(Colour)
Set the terminal background colour. This is not supported on Windows.
Sgr(Vec<SgrParameter>)
Set attributes on the current terminal. This is not supported on Windows. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
Implementations§
Trait Implementations§
source§impl Ord for Ansi
impl Ord for Ansi
source§impl PartialEq for Ansi
impl PartialEq for Ansi
source§impl PartialOrd for Ansi
impl PartialOrd for Ansi
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more