[][src]Trait crossterm_cursor::Command

pub trait Command {
    type AnsiType: Display;
    fn get_ansi_code(&self) -> Self::AnsiType;
}

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!

Loading content...

Implementors

impl Command for BlinkOff[src]

type AnsiType = &'static str

impl Command for BlinkOn[src]

type AnsiType = &'static str

impl Command for Down[src]

type AnsiType = String

impl Command for Goto[src]

type AnsiType = String

impl Command for Hide[src]

type AnsiType = &'static str

impl Command for Left[src]

type AnsiType = String

impl Command for Output[src]

impl Command for ResetPos[src]

type AnsiType = &'static str

impl Command for Right[src]

type AnsiType = String

impl Command for SavePos[src]

type AnsiType = &'static str

impl Command for Show[src]

type AnsiType = &'static str

impl Command for Up[src]

type AnsiType = String

Loading content...