Crate textmode[][src]

Expand description

textmode is a library for terminal interaction built on top of a real terminal parsing library. It allows you to do arbitrary drawing operations on an in-memory screen, and then update the visible terminal output to reflect the in-memory screen via an optimized diff algorithm when you are finished. Being built on a real terminal parsing library means that while normal curses-like operations are available:

use textmode::Textmode;
let mut tm = textmode::Output::new().await?;
tm.move_to(5, 5);

you can also write data containing arbitrary terminal escape codes to the output and they will also do the right thing:


This module is split into two main parts: Output and Input. See the documentation for those types for more details. Additionally, the blocking module provides an equivalent interface with blocking calls instead of async.


Blocking interface.

Constants for the basic 16 terminal colors.


Represents a foreground or background color for cells.

Type for errors returned by this crate.

Type representing a keypress.


Provides the methods used to manipulate the in-memory screen.

Type Definitions

Convenience wrapper for a Result using textmode::Error.