[−][src]Trait crossterm::Command
A command is an action that can be performed on the terminal.
crossterm already delivers a number of commands. There is no need to implement them yourself. Also, you don't have to execute the commands yourself by calling a function. For more information see the command API
Associated Types
Loading content...Required methods
fn get_ansi_code(&self) -> Self::AnsiType
Returns the ANSI code representation of this command. You can manipulate the terminal behaviour by writing an ANSI escape code to the terminal. You are able to use ANSI escape codes only for windows 10 and UNIX systems.
This method is mainly used internally by crossterm!
fn execute_winapi(&self) -> Result<(), ErrorKind>
Execute this command.
On operating systems that do not support ANSI escape codes ( < Windows 10) we need to call WinApi to execute this command.
This method is mainly used internally by crossterm!
Implementors
impl Command for BlinkOff
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <BlinkOff as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for BlinkOn
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <BlinkOn as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Clear
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <Clear as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Down
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Down as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Goto
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Goto as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Hide
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <Hide as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Left
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Left as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Output
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Output as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for ResetPos
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <ResetPos as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Right
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Right as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for SavePos
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <SavePos as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for ScrollDown
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <ScrollDown as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for ScrollUp
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <ScrollUp as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for SetAttr
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <SetAttr as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for SetBg
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <SetBg as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for SetFg
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <SetFg as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for SetSize
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <SetSize as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Show
[src]
type AnsiType = &'static str
fn get_ansi_code(&self) -> <Show as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl Command for Up
[src]
type AnsiType = String
fn get_ansi_code(&self) -> <Up as Command>::AnsiType
[src]
fn execute_winapi(&self) -> Result<(), ErrorKind>
[src]
impl<D> Command for PrintStyledFont<D> where
D: Display + Clone,
[src]
D: Display + Clone,