[−][src]Crate crossterm
Modules
color | 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. |
cursor | 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. |
error | Module containing error handling logic. |
input | A module that contains all the actions related to reading input from the terminal. Like reading a line, reading a character and reading asynchronously. |
output | A module that provides a uniformed way to write to the output no matter if it is in main, alternate or raw mode. |
style | 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. |
terminal | A module that contains all the actions related to the terminal. like clearing, resizing, pausing and scrolling the terminal. |
Macros
csi | This macro will take an ANSI input and combines it with some default ANSI characters and returns the result |
Structs
AlternateScreen | 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. |
AsyncReader | 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. |
Crossterm | This type could be used to access the |
DisplayableObject | 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. |
ObjectStyle | Struct that contains the style properties that can be applied to an displayable object. |
Screen | This type represents a screen which could be in normal, raw and alternate modes. |
StyledObject | Struct that contains both the style and the content wits can be styled. |
Terminal | Struct that stores a platform-specific platform implementation for terminal related actions. |
TerminalColor | Struct that stores a platform-specific implementation for color related actions. |
TerminalCursor | Struct that stores a platform-specific implementation for cursor related actions. |
TerminalInput | Struct that stores a platform-specific implementation for input related actions. |
TerminalOutput | Struct that is a handle to a terminal screen. This handle could be used to write to the current screen |
Enums
Attribute | Attributes that could be applied on some text. (*nix values) |
Color | Colors that are available for coloring the terminal font. |
ColorType | Color types that can be used to determine if the Color enum is a Fore- or Background Color. |
KeyEvent | This enum represents key events which could be caused by the user. |
Functions
color | Get a |
cursor | Get a |
input | Get a |
style | This could be used to style an |
terminal | Get a |