Crate crossterm[][src]

Crossterm provides the same core functionalities for both windows and unix systems. Crossterm aims to be simple and easy to call in code. True the simplicity of Crossterm you do not have to worry about the platform your working with. You can just call the action you want to perform and under water it will check what to do based on the current platform.

Modules

cursor

This trait defines the actions that can be preformed with the terminal cursor. This trait can be implemented so that an concrete implementation of the ITerminalCursor can for fill the wishes to work on an specific platform.

manager

This module provides one place to work with the screen.

raw

This module is used for enabling and disabling raw mode for the terminal.

screen

This module contains all the logic for switching between alternate screen and main screen.

style

This module is used for styling the terminal text. Under styling we can think of coloring the font and applying attributes to it.

terminal

Module that contains all the actions related to the terminal.

Macros

csi

This macro will take an ANSI input and combines it with some default ANSI characters and returns the result

Structs

Context

This type is the context of the current terminal. The context is a wrapper for states changes of the terminal and can be used for managing the output of the terminal.

Crossterm

Because it can seem a little odd to constantly create an Context and provide it to modules like: cursor, color and terminal. You can better use Crossterm for accessing these modules. Crossterm handles the Context internally so jo do not have to bother about it, for example: