Crate mortal

source ·
Expand description

Platform-independent terminal interface

Two distinct interfaces to operating system terminal devices are provided, each abstracting over the differences between Unix terminals and Windows console.

The Terminal interface treats the terminal as a line-by-line output device. Methods exist to add color and style attributes to text, and to make relative movements of the cursor.

The Screen interface treats the entire terminal window as a drawable buffer. Methods exist to set the cursor position and to write text with color and style attributes.

The term_write! and term_writeln! macros provide a convenient interface to output attributes and formatted text to either a Terminal or Screen instance.

Concurrency

Each interface uses internal locking mechanisms to allow sharing of the terminal interface between threads while maintaining coherence of read/write operations.

See the documentation for Terminal and Screen for further details.

Re-exports

Modules

  • Provides a drawable buffer on terminal devices
  • Utilities for manipulating raw input sequences
  • Contains types relating to operating system signals
  • Provides an interface to terminal devices
  • Unix extension trait
  • Miscellaneous utility functions

Macros

  • Writes attributes and formatted text to a Terminal or Screen.
  • Writes attributes and formatted text to a Terminal or Screen.