Crate crossterm

source ·

Modules

A module that contains all the actions related to the styling of the terminal. Like applying attributes to font and changing the foreground and background.
A module that contains all the actions related to cursor movement in the terminal. Like: moving the cursor position; saving and resetting the cursor position; hiding showing and control the blinking of the cursor.
A module that contains all the actions related to reading input from the terminal. Like reading a line, reading a character and reading asynchronously.
A module that provides a uniformed way to write to the output no matter if it is in main, alternate or raw mode.
A module that contains all the actions related to the styling of the terminal. Like applying attributes to font and changing the foreground and background.
A module that contains all the actions related to the terminal. like clearing, resizing, pausing and scrolling the terminal.

Macros

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

Structs

With this type you will be able to switch to alternate screen and back to main screen. Check also the Screen type for swishing to alternate mode.
This is a wrapper for reading from the input asynchronously. This wrapper has a channel receiver that receives the input from the user whenever it typed something. You only need to check whether there are new characters available.
This type could be used to access the cursor, terminal, color, input, styling module more easily. You need to pass a reference to the screen whereon you want to perform the actions to the Crossterm type.
This is a wrapper for a styled object on ‘alternate screen’ so that the styled object could be printed on the ‘alternate screen’ with the standard write functions in rust.
Struct that contains the style properties that can be applied to an displayable object.
This type represents a screen which could be in normal, raw and alternate modes.
Struct that contains both the style and the content wits can be styled.
Struct that stores a platform-specific platform implementation for terminal related actions.
Struct that stores a platform-specific implementation for color related actions.
Struct that stores a platform-specific implementation for cursor related actions.
Struct that stores a platform-specific implementation for input related actions.
Struct that is a handle to a terminal screen. This handle could be used to write to the current screen

Enums

Attributes that could be applied on some text. (*nix values)
Colors that are available for coloring the terminal font.
Color types that can be used to determine if the Color enum is a Fore- or Background Color.
This enum represents key events which could be caused by the user.

Functions

Get a TerminalColor implementation whereon color related actions can be performed.
Get a TerminalCursor instance whereon cursor related actions can be performed.
Get a TerminalInput instance whereon input related actions can be performed.
This could be used to style an Displayable type with colors and attributes.
Get a Terminal instance whereon terminal related actions could performed.