Trait crossterm::Command

source ·
pub trait Command {
    // Required method
    fn write_ansi(&self, f: &mut impl Write) -> Result;
}
Expand description

An interface for a command that performs an action on the terminal.

Crossterm provides a set of commands, and there is no immediate reason to implement a command yourself. In order to understand how to use and execute commands, it is recommended that you take a look at Command API chapter.

Required Methods§

source

fn write_ansi(&self, f: &mut impl Write) -> Result

Write an ANSI representation of this command to the given writer. An ANSI code can manipulate the terminal by writing it to the terminal buffer. However, only Windows 10 and UNIX systems support this.

This method does not need to be accessed manually, as it is used by the crossterm’s Command API

Implementations on Foreign Types§

source§

impl<T: Command + ?Sized> Command for &T

source§

fn write_ansi(&self, f: &mut impl Write) -> Result

Implementors§

source§

impl Command for SetCursorStyle

source§

impl Command for DisableBlinking

source§

impl Command for EnableBlinking

source§

impl Command for Hide

source§

impl Command for MoveDown

source§

impl Command for MoveLeft

source§

impl Command for MoveRight

source§

impl Command for MoveTo

source§

impl Command for MoveToColumn

source§

impl Command for MoveToNextLine

source§

impl Command for MoveToPreviousLine

source§

impl Command for MoveToRow

source§

impl Command for MoveUp

source§

impl Command for RestorePosition

source§

impl Command for SavePosition

source§

impl Command for Show

source§

impl Command for DisableBracketedPaste

source§

impl Command for DisableFocusChange

source§

impl Command for DisableMouseCapture

source§

impl Command for EnableBracketedPaste

source§

impl Command for EnableFocusChange

source§

impl Command for EnableMouseCapture

source§

impl Command for PopKeyboardEnhancementFlags

source§

impl Command for PushKeyboardEnhancementFlags

source§

impl Command for ResetColor

source§

impl Command for SetAttribute

source§

impl Command for SetAttributes

source§

impl Command for SetBackgroundColor

source§

impl Command for SetColors

source§

impl Command for SetForegroundColor

source§

impl Command for SetStyle

source§

impl Command for SetUnderlineColor

source§

impl Command for BeginSynchronizedUpdate

source§

impl Command for Clear

source§

impl Command for DisableLineWrap

source§

impl Command for EnableLineWrap

source§

impl Command for EndSynchronizedUpdate

source§

impl Command for EnterAlternateScreen

source§

impl Command for LeaveAlternateScreen

source§

impl Command for ScrollDown

source§

impl Command for ScrollUp

source§

impl Command for SetSize

source§

impl<D: Display> Command for PrintStyledContent<D>

source§

impl<T: Display> Command for Print<T>

source§

impl<T: Display> Command for SetTitle<T>